Changes between Version 14 and Version 15 of DeveloperGuidelines/Internationalisation


Ignore:
Timestamp:
05/24/10 07:02:12 (12 years ago)
Author:
Fran Boon
Comment:

Notes from Dominic on mailing list

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Internationalisation

    v14 v15  
    3939All reference to the options in View code should be by Index not by string (since the string can be changed).
    4040
     41{{{
     42The first problem for i18n are variables in the translation strings. While
     43constants are recognized and added to the translation file during code
     44compilation - variable strings are not added to the translation file unless
     45you execute the code with all possible combinations:
     46
     47"If the string to be translated is not a constant but a variable, it will be
     48added to the translation file at runtime to be translated later." (web2py
     49manual).
     50
     51This is problematic, because you need to know which functions have to be
     52executed and how in order to produce a complete dictionary, and at every code
     53update, you have to do it again. Hence, it is likely that those strings will
     54be missed by offline translations (i.e. pre-deployment), and have to be
     55translated in the field. As an exception, this is acceptable.
     56
     57The other problem is that your construction assumes that number of words and
     58word order in the respective phrases are the same in all languages, which is
     59a typical idea of English native speakers - but not true. Especially we
     60Germans use a quite different word order (which is totally twisted, as you
     61know, but we're not the only ones), e.g.
     62
     63'Add New ' + table_name
     64
     65must be German one of:
     66table_name + " erstellen" (best option)
     67table_name + " hinzufügen" (still ok)
     68"Füge " + table_name + " hinzu" (imperative form, not good in German)
     69
     70where translating the "New" would introduce another problem which is about the
     71grammatical gender:
     72"New X" could be in German either of "Neue X", "Neues X" oder "Neuen X". And
     73believe me not even I can explain the German use of gender (e.g. "Software"
     74is female, i.e. "she" - and this is not even a German word; while a computer
     75is male, i.e. "he", and that is not a German word either).
     76
     77And semantics make it yet harder. It might be possible to "Bearbeite
     78Mitteilung" ("Edit Message"), which means to "modify the contents of a
     79message", while it is not possible to "Bearbeite Person" ("Edit Person"),
     80because that would mean to "make that person agree in something".
     81
     82Similar for "Löschen" (for "Delete"), which is pretty ambiguous as it stands
     83for "Delete" (remove something from the computer memory) as well as
     84for "Extinguish" (e.g. fire) and some other meanings. To use it
     85with "Person", you'd need to use an object periphrasis like "Eintrag"
     86("entry") or "Personendaten" ("personal data").
     87
     88Difficult, difficult. Therefore - use string constants.
     89}}}
    4190== Time ==
    4291All references to time should use {{{request.utcnow}}} rather than {{{request.now}}}