How do you
scope the language? I don't see that in the implementation
in Squeak of System-Localization. To make it even works I have to say
that we have even Web application that can have different parts of
the same session in different languages ;-)
In most cases I use only one language so standard Squeak translation
mechanism is OK ;-) But where I need many languages, I use special
"literal" where I define all translations together. It's better for
mainenance.
Certainly, I completely agree. What I do not understand is the way
how the #translated mechanisme works in Squeak. As far as I can see
there is nothing like a dynamic scope but just a global variable,
something that certainly does not work in the context of a Web
application.
So I think that the standard
#translated message will be the best solution and the final
translation mechanism will be then dependent only on user's choice
(for example user-modified implementation of #translated message).
What do you think?
I don't see, but if you change #translated to use a dynamic variable
you break all the Squeak tools that use #translated. No?
The exception based dynamic variable (for current language) returns
nil in case it is not defined in current stack. So then the default
implementation can be used.
Yes, that's what we do in productive applications. In development
mode the translated string object can display a red warning and
potentially a link to an editor to translate the actual string ;-)
Now the only way how to create localized Magritte and
Pier
applications is to modify their source code. We should solve it
somehow.
Do you really think so? At least for Magritte there shouldn't be too
much hardcoded strings anymore, as I use it in several productive
multi-lingual applications. For Pier this is indeed a different story.
Unfortunately all the labels and comments in the descriptions are
hardcoded, due to the fact that I only used it in english contexts.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch