Improved handling for undeterminded languages

This commit is contained in:
Michael 2024-01-07 10:11:52 +00:00
parent 6cd0e1e35f
commit 6e830f7774
4 changed files with 79 additions and 72 deletions

View file

@ -436,7 +436,9 @@ class L10n
{
$iso639 = new \Matriphe\ISO639\ISO639;
$languages = ['un' => $this->t('Undeteced Language')];
// In ISO 639-2 undetermined languages have got the code "und".
// There is no official code for ISO 639-1, but "un" is not assigned to any language.
$languages = ['un' => $this->t('Undetermined')];
foreach ($this->getDetectableLanguages() as $code) {
$code = $this->toISO6391($code);