Le Jeu 30 déc 10:29:22 2004, Brian Candler écrit:
On Wed, Dec 29, 2004 at 09:18:47PM +0000, Paul L. Allen wrote:
If I understand it correctly, to use it in sqwebmail would STILL require
template substitution. Instead of having <td>Login</td> the template
would have <td>[#S509#]</td>, the code would spot the [#S509#] and
translate that using an internal table that maps S590 to Login and then
it would call gettext to translate Login.
I'm sure you could map S590 to "Login" directly in gettext. The difference
would be that should the particular language translation be missing that
string, the user would actually see "S590" on the web page, instead of the
English string.
Yes, it's not the right way to do. The fallback language should be
understadable by humans (at least, by administrators). Furthermore
the transaltors will be bored when translating lots of Sxxx strings
and the html templates will be obscure for editors.
A better way if to use a special pattern like
[#!Login#]
"Login" string will be passed thru gettext who will leave it unchanged
when the translated string is not present.
The chosen form should handle plural correctly with the help of
gettext. From an example of the gettext info :
In Polish we use e.g. plik (file) this way:
1 plik
2,3,4 pliki
5-21 pliko'w
22-24 pliki
25-31 pliko'w