language.schema.yml

Same filename in other branches
  1. 9 core/modules/language/config/schema/language.schema.yml
  2. 8.9.x core/modules/language/config/schema/language.schema.yml
  3. 10 core/modules/language/config/schema/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: [ 'ltr', 'rtl' ]
  107. weight:
  108. type: weight
  109. label: 'Weight'
  110. locked:
  111. type: boolean
  112. label: 'Locked'
  113. language.content_settings.*.*:
  114. type: config_entity
  115. label: 'Content Language Settings'
  116. constraints:
  117. FullyValidatable: ~
  118. mapping:
  119. id:
  120. type: string
  121. label: 'ID'
  122. constraints:
  123. NotBlank: []
  124. target_entity_type_id:
  125. type: string
  126. label: 'Entity Type ID'
  127. constraints:
  128. PluginExists:
  129. manager: entity_type.manager
  130. interface: Drupal\Core\Entity\ContentEntityInterface
  131. target_bundle:
  132. type: string
  133. label: 'Bundle'
  134. constraints:
  135. EntityBundleExists: '%parent.target_entity_type_id'
  136. default_langcode:
  137. type: langcode
  138. label: 'Default language'
  139. constraints:
  140. Choice:
  141. # The "default language" has a different list of allowed values.
  142. callback: '\Drupal\language\Entity\ContentLanguageSettings::getAllValidDefaultLangcodes'
  143. language_alterable:
  144. type: boolean
  145. label: 'Allow to alter the language'
  146. condition.plugin.language:
  147. type: condition.plugin
  148. mapping:
  149. langcodes:
  150. type: sequence
  151. sequence:
  152. type: langcode

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