Liste des langues installées + normalisation des noms de fichiers
This commit is contained in:
parent
072e6b9ed4
commit
2570dc157a
@ -35,6 +35,46 @@ class translate extends common {
|
||||
// Activation du bouton de copie
|
||||
public static $siteTranslate = true;
|
||||
|
||||
public static $languagesContent = [
|
||||
'az_AZ' => 'Azərbaycan dili',
|
||||
'bg_BG' => 'български език',
|
||||
'ca' => 'Català, valencià',
|
||||
'cs' => 'čeština, český jazyk',
|
||||
'da' => 'Dansk',
|
||||
'de' => 'Deutsch',
|
||||
'el_GR' => 'ελληνικά',
|
||||
'en_EN' => 'English',
|
||||
'es' => 'Español',
|
||||
'fa' => 'فارسی',
|
||||
'fr_FR' => 'Français',
|
||||
'he_IL' => 'Hebrew (Israel)',
|
||||
'hr' => 'Hrvatski jezik',
|
||||
'hu_HU' => 'Magyar',
|
||||
'id' => 'Bahasa Indonesia',
|
||||
'it' => 'Italiano',
|
||||
'ja' => '日本',
|
||||
'lt' => 'Lietuvių kalba',
|
||||
'mn_MN' => 'монгол',
|
||||
'nb_NO' => 'Norsk bokmål',
|
||||
'nn_NO' => 'Norsk nynorsk',
|
||||
'nl' => 'Nederlands, Vlaams',
|
||||
'pl' => 'Język polski, polszczyzna',
|
||||
'pt_BR' => 'Português(Brazil)',
|
||||
'pt_PT' => 'Português',
|
||||
'ro' => 'Română',
|
||||
'ru' => 'Pусский язык',
|
||||
'sk' => 'Slovenčina',
|
||||
'sl' => 'Slovenski jezik',
|
||||
'sv_SE' => 'Svenska',
|
||||
'th_TH' => 'ไทย',
|
||||
'tr_TR' => 'Türkçe',
|
||||
'uk_UA' => 'Yкраїнська мова',
|
||||
'vi' => 'Tiếng Việt',
|
||||
'zh_CN' => '中文 (Zhōngwén), 汉语, 漢語',
|
||||
|
||||
// source: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
||||
];
|
||||
|
||||
/**
|
||||
* Configuration avancée des langues
|
||||
*/
|
||||
@ -195,6 +235,7 @@ class translate extends common {
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
|
||||
// Préparation de l'affichage du formulaire
|
||||
|
||||
// Liste des langues disponibles
|
||||
@ -204,7 +245,10 @@ class translate extends common {
|
||||
$files = glob('*.json');
|
||||
// Ajouter une clé au tableau avec le code de langue
|
||||
foreach( $files as $file) {
|
||||
self::$i18nFiles[basename($file, '.json')] = $file;
|
||||
// La langue est-elle référencée ?
|
||||
if (array_key_exists(basename($file, '.json'), self::$languagesContent)) {
|
||||
self::$i18nFiles[basename($file, '.json')] = self::$languagesContent[basename($file, '.json')];
|
||||
}
|
||||
}
|
||||
chdir($dir);
|
||||
}
|
||||
|
BIN
site/i18n/es.zip
BIN
site/i18n/es.zip
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user