language.schema.yml

core/modules/language/config/schema/language.schema.yml

File

core/modules/language/config/schema/language.schema.yml

View source
  1. # Schema for the configuration files of the Language module.
  2. language_type_negotiation:
  3. type: mapping
  4. label: 'Language negotiation per type setting'
  5. mapping:
  6. enabled:
  7. type: sequence
  8. label: 'Enabled negotiators'
  9. sequence:
  10. type: integer
  11. label: Weight
  12. method_weights:
  13. type: sequence
  14. label: 'Negotiator weights'
  15. sequence:
  16. type: integer
  17. label: Weight
  18. language.types:
  19. type: config_object
  20. label: 'Language types'
  21. mapping:
  22. all:
  23. type: sequence
  24. label: 'All language types'
  25. sequence:
  26. type: string
  27. label: 'Language type'
  28. configurable:
  29. type: sequence
  30. label: 'Configurable language types'
  31. sequence:
  32. type: string
  33. label: 'Language type'
  34. negotiation:
  35. type: sequence
  36. label: 'Language negotiation per type settings'
  37. sequence:
  38. type: language_type_negotiation
  39. label: 'Language negotiation per type setting'
  40. language.negotiation:
  41. type: config_object
  42. label: 'Language detection methods'
  43. mapping:
  44. session:
  45. type: mapping
  46. label: 'Session'
  47. mapping:
  48. parameter:
  49. type: string
  50. label: 'Request/session parameter'
  51. url:
  52. type: mapping
  53. label: 'Language from the URL (Path prefix or domain).'
  54. mapping:
  55. source:
  56. type: string
  57. label: 'Part of the URL that determines language'
  58. prefixes:
  59. type: sequence
  60. label: 'Path prefix configuration'
  61. sequence:
  62. type: string
  63. label: 'Path prefix'
  64. domains:
  65. type: sequence
  66. label: 'Domain configuration'
  67. sequence:
  68. type: string
  69. label: 'Domain'
  70. selected_langcode:
  71. type: langcode
  72. label: 'Selected language'
  73. language.mappings:
  74. type: config_object
  75. label: 'Language mapping'
  76. mapping:
  77. map:
  78. type: sequence
  79. sequence:
  80. type: string
  81. label: 'Language'
  82. language.entity.*:
  83. type: config_entity
  84. label: 'Language'
  85. constraints:
  86. FullyValidatable: ~
  87. mapping:
  88. id:
  89. type: string
  90. label: 'ID'
  91. constraints:
  92. NotBlank: []
  93. Regex:
  94. # @see \Drupal\Core\Language\LanguageInterface::VALID_LANGCODE_REGEX
  95. pattern: '/[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*/'
  96. message: 'This is not a valid language code.'
  97. label:
  98. type: required_label
  99. label: 'Label'
  100. direction:
  101. type: string
  102. label: 'Direction'
  103. constraints:
  104. # @see \Drupal\Core\Language\LanguageInterface::DIRECTION_LTR and
  105. # \Drupal\Core\Language\LanguageInterface::DIRECTION_RTL
  106. Choice:
  107. choices: [ 'ltr', 'rtl' ]
  108. weight:
  109. type: weight
  110. label: 'Weight'
  111. locked:
  112. type: boolean
  113. label: 'Locked'
  114. language.content_settings.*.*:
  115. type: config_entity
  116. label: 'Content Language Settings'
  117. constraints:
  118. FullyValidatable: ~
  119. mapping:
  120. id:
  121. type: string
  122. label: 'ID'
  123. constraints:
  124. NotBlank: []
  125. target_entity_type_id:
  126. type: string
  127. label: 'Entity Type ID'
  128. constraints:
  129. PluginExists:
  130. manager: entity_type.manager
  131. interface: Drupal\Core\Entity\ContentEntityInterface
  132. target_bundle:
  133. type: string
  134. label: 'Bundle'
  135. constraints:
  136. EntityBundleExists: '%parent.target_entity_type_id'
  137. default_langcode:
  138. type: langcode
  139. label: 'Default language'
  140. constraints:
  141. Choice:
  142. # The "default language" has a different list of allowed values.
  143. callback: '\Drupal\language\Entity\ContentLanguageSettings::getAllValidDefaultLangcodes'
  144. language_alterable:
  145. type: boolean
  146. label: 'Allow to alter the language'
  147. condition.plugin.language:
  148. type: condition.plugin
  149. mapping:
  150. langcodes:
  151. type: sequence
  152. sequence:
  153. type: langcode

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.