You are here

constant LanguageInterface::VALID_LANGCODE_REGEX in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Language/LanguageInterface.php \Drupal\Core\Language\LanguageInterface::VALID_LANGCODE_REGEX
  2. 9 core/lib/Drupal/Core/Language/LanguageInterface.php \Drupal\Core\Language\LanguageInterface::VALID_LANGCODE_REGEX

A regex for validating language codes according to W3C specifications.

See also

https://www.w3.org/International/articles/language-tags/

File

core/lib/Drupal/Core/Language/LanguageInterface.php, line 61

Class

LanguageInterface
Defines an interface for languages.

Namespace

Drupal\Core\Language

Code

const VALID_LANGCODE_REGEX = '[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*';