From b6f4276c6cc2e5a53f0a4afb1536960427fa995e Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Mon, 6 Oct 2025 15:09:01 -0400 Subject: Change regional language codes (#8065) * Change regional language codes According to `ISO-639-1` and `ISO-3166-1 alpha-2` recommendations, regional languages must be written with the language code in lowercase and the region in uppercase. For instance, we should have `en-US` instead of `en-us`. Folders have been updated to reflect those recommendations and regional language codes have been updated in the translation files. * Update README files * Fix configuration for typos * Revert language order in documentation * Remove unnecessary code * Change language configuration getter * Fix phpstan error * Fix typo * Add types * escape regex * Move language logic to avoid magic or deprecated methods * Minor fix on regex --- app/i18n/es/gen.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/i18n/es/gen.php') diff --git a/app/i18n/es/gen.php b/app/i18n/es/gen.php index d16f2f07c..bd320df0a 100644 --- a/app/i18n/es/gen.php +++ b/app/i18n/es/gen.php @@ -161,7 +161,7 @@ return array( 'de' => 'Deutsch', // IGNORE 'el' => 'Ελληνικά', // IGNORE 'en' => 'English', // IGNORE - 'en-us' => 'English (United States)', // IGNORE + 'en-US' => 'English (United States)', // IGNORE 'es' => 'Español', // IGNORE 'fa' => 'فارسی', // IGNORE 'fi' => 'Suomi', // IGNORE @@ -176,14 +176,14 @@ return array( 'nl' => 'Nederlands', // IGNORE 'oc' => 'Occitan', // IGNORE 'pl' => 'Polski', // IGNORE - 'pt-br' => 'Português (Brasil)', // IGNORE - 'pt-pt' => 'Português (Portugal)', // IGNORE + 'pt-BR' => 'Português (Brasil)', // IGNORE + 'pt-PT' => 'Português (Portugal)', // IGNORE 'ru' => 'Русский', // IGNORE 'sk' => 'Slovenčina', // IGNORE 'tr' => 'Türkçe', // IGNORE 'uk' => 'Українська', // IGNORE - 'zh-cn' => '简体中文', // IGNORE - 'zh-tw' => '正體中文', // IGNORE + 'zh-CN' => '简体中文', // IGNORE + 'zh-TW' => '正體中文', // IGNORE ), 'menu' => array( 'about' => 'Acerca de', -- cgit v1.2.3