Topic: en_US gets deleted even if UTF8 mo is remaining
A default FA install comes with lang/en_US/LC_MESSAGES/en_US.mo file which is UTF-8 encoded. Therefore it must be included in the lang/installed_languages.inc file like:
<?php
/* How to make new entries here for non-packaged languages:
-- 'code' should match the name of the directory for the language under \lang
.-- 'name' is the name that will be displayed in the language selection list (in Users and Display Setup)
-- 'rtl' only needs to be set for right-to-left languages like Arabic and Hebrew
-- 'encoding' used in translation file
-- 'version' always set to '' for manually installed languages.
-- 'path' installation path related to FA root (e.g. 'lang/en_US').
*/
$installed_languages = array (
0 =>
array (
'code' => 'C',
'name' => 'English',
'encoding' => 'iso-8859-1',
),
1 =>
array (
'code' => 'en_US',
'name' => 'English US UTF8',
'encoding' => 'utf-8',
'path' => 'lang/en_US',
'version' => '',
),
);
$dflt_lang = 'C';
?>
Now when we install the en_US ISO 8859-1 version from the official repo, the new mo and po files with the version number as part of their filename get into the same folder along with the original en_US UTF-8 encoded file.
Now only the official ISO encoded en_US is available in the language choice drop down boxes.
When we now uninstall the official en_US ISO language, the whole en_US folder gets deleted including the original UTF-8 encoded mo file.
If the original path is changed from en_US to en_US_UTF8 to prevent such deletion, then it does not show up as part of the installed languages!