On 07.05.2010 16:17, Hilaire Fernandes wrote:
> I have uploaded a new version of the gettext package. I have removed a
> few classes used for the itnernal translator. So now, only gettext based
> catalog messages is used.
>
> Philipp, I have added a String>>translateTo: aLocale you can used from
> Seaside application.
Thanks, but I think I don't need it. I spent a bit of time hacking and
came up with a protoype [1] (Seaside-Gettext-Core and
Seaside-Gettext-Examples).
- I made a per request localization context that caches the domain,
locale and translator. That stuff now is only looked up the first time
you translate a string in a request. Because of this I can use
#translate:inDomain: directly.
- The domain is based on the application and not the class category of
the sender.
- The locale is first looked up on the session and then the request.
- I made a subclass of GetTextExporter that uses a custom
TranslatedReceiverFinder based on RB (thanks to Lukas "Wizard of RB")
that searches for my selectors.
I'll make a post to seaside-dev on how to use it.
I'm a happy camper now.
[1]
http://www.squeaksource.com/Seaside29Addons.htmlCheers
Philippe
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project