0

Is there any way to get Unicode v11 supported script names from Drupal data? I would like to use '~@(\p{Language}+)~u', but Drupal provides different language names such as "Russian" and "Mongolian" instead of the Unicode name "Cyrillic". These do not work with \p{}.

// Get current site language.
$language =  \Drupal::languageManager()->getCurrentLanguage()->getName();

$language is part of...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.