You are here

constant LanguageInterface::VALID_LANGCODE_REGEX in Drupal 8

Same name and namespace in other branches
  1. 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 59

Class

LanguageInterface
Defines a language.

Namespace

Drupal\Core\Language

Code

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