In the developing the language manager it was determined that when a language was installed it would result in the download of 60-100 files containing the language packages for each module. This number of downloads increases the possibility of failure and quite likely to increase the response time.
The proposed solution was to prepackage all the module language packages into a single download for each language.
Some thoughts to consider:
- the two variants of chinese (zh_CN, zh_TW) and british english (en_GB) need to be treated as separate languages.
- all the variants of a language need to be packaged together as there is a dependency. For example, the Argentine (es_AR) and Mexican (es_MX) language variants require that base (es_ES).
- The proposed solution would be to generate all the global language packages when ever a module is packaged for a given repository. The generated language package would be placed in the repository/global directory. This directory would a peer of modules and themes.
- The naming convention for the global language package would be 'lang-xx-nnnnn.package'. Where xx is the language (i.e. en_GB, zh_CN, zh_TW, pt, es, etc.) and nnnnn would be the maximum revision that was found in all of the language packages.
- When the index was generated, the list of packages would be put under the 'global' array element. Using the same format as packages that are placed under the 'modules' or 'themes' array elements.
$index = array('global' => array(...),
'modules' => array(...),
'themes' => array(...));