[Sputnik-list] regarding internationalization

Yuri Takhteyev yuri at sims.berkeley.edu
Tue Jun 26 16:37:14 GMT+3 2007


Ok, I see Andre's point about using identified that look like
identifiers.  On the other hand, _(...) is the format used by gettext,
so the advantage of using it is that anyone who has worked with
internationalization is likely to know that _(...) has something to do
with internationalization.  If we also use identified that will look
more formal, e.g., _(YOU_ARE_LOGGED_OUT), I think it will make it
clear to those who have worked with gettext that (1) this string has
something to do with internationalization, (2) it's not quite gettext.
 Which, I suppose, is good.

I do think it makes more sense to give those identified names that are
roughly based on what they say.  E.g., _(HI_USER) rather than
_(USER_GREETING), except in cases where such forms are ambiguous,
since I think this would make the templates read more naturally.

Another thing I was thinking of adding would be a list of variables
that are set inserted by the string.  E.g., one could write the
following:

    _(HI_USER $user)

or

    _(VERSION_FROM_AND_BY $version $author)

Where $user indicates that HI_USER strings will contain $user in them
and VERSION_FROM_AND_BY will contain $version and $author.  One can
then later write a script to test that the translation strings are
inserting the right variables.

>    We're ready to work on the portuguese (brazilian) translation, once we
> get the final word for the aproach from Yuri.

The issue of syntax used in to mark the translatable strings in the
templates is independent from actual translation, so you guys can go
ahead and do the translation.  Regardless of whether we call the
variable _(VERSION_FROM_AND_BY) or $Version_Info, the Portuguese
translation of "Version from $version, by <b>$author</b>" will be the
same.

-- 
Yuri Takhteyev
UC Berkeley School of Information
http://www.freewisdom.org/



More information about the Sputnik-list mailing list