#40 make a rule for dealing with locales and arrangment

4.0
closed
i18n/l10n (13)
9
2012-02-08
2012-02-07
No

Nucleus CMS's multi-language function is based on its translation files. But there are no identiccal rules.

In the world, the classification of (written) language is complicated because it's related nation or region, history, culture and so on.

This causes some problems. For example, translation files for Portuguese in Portugal or Brazil, simple or traditional Chinese in China or Taiwan, Spanish or Catalan or Galego in Spain.

There is a strong demand for a rule to arrange these translation files.

Discussion

  • Anonymous - 2012-02-07
    • summary: make a rule for dealing with locales and arranging translati --> make a rule for dealing with locales and arrangment
     
  • Anonymous - 2012-02-08

    There is RFC 5646. Its title is 'Tags for Identifying Languages' and the purpose of this document is to 'specifies a particular identifier mechanism (the language tag) and a registration function for values to be used to form tags'.

    According to this, the language tags are defined as "language-script-region". Each elements are also defined in ISO 639/15924/3166 and language tags are registered in IANA.
    http://www.iana.org/assignments/language-subtag-registry

    We utilize this with character encoding scheme. The character encoding scheme is also registered in IANA and almost of them includes hyphen-minus.
    http://www.iana.org/assignments/character-sets

    To identify these 'hyphen-minus', we utilize under score instead of hyphen-minus for language tags, like "language_script_region".

    To use language tags, we utilize 'locale'. Each locale has its own translation file in Nucleus CMS. In this respect, whole translation files are renamed here.

    CHANGE: rename and re-encoding language files with new naming rule, "language_script_region.charset.php", refering to RFC 5646 (http://datatracker.ietf.org/doc/rfc5646/). Some language files are fail to re-encoding and they're renamed with UNKNOWN.
    http://nucleuscms.svn.sourceforge.net/viewvc/nucleuscms?view=revision&revision=1597

    And i18n class have some members related to these ideas.We can get the current locale via i18n::get_current_locale() and get the current character set via i18n::get_current_charset(). The available locale list under i18n::get_current_charset() is got via i18n::get_available_locale_list().

     
  • Anonymous - 2012-02-08
    • status: open --> closed
     

Log in to post a comment.