Ahh.... (been bothering me for a while :) )<br><br><div class="gmail_quote">On Mon, May 10, 2010 at 9:28 AM, Philippe Marschall <span dir="ltr"><<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">2010/5/9 Philippe Marschall <<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hi<br>
><br>
> Up until now if you wanted to have a multilingual Seaside application<br>
> in Pharo you had to "roll your own" which can be a bit uncool. Hilaire<br>
> ported the gettext package from the OLPC to Pharo and I wrote a small<br>
> Seaside layer on top of it.<br>
><br>
> What you need:<br>
> 1. update to the very latest Seaside 3.0<br>
> 2. unzip the attached file in your image folder<br>
> 3. load Gettext from PharoInbox<br>
> 4. load Seaside-Gettext-Core from [1]<br>
> 5. load Seaside-Gettext-Examples from [1]<br>
> 6. go to <a href="http://127.0.0.1:8080/gettext" target="_blank">http://127.0.0.1:8080/gettext</a><br>
><br>
> Usage:<br>
> Right now the API is:<br>
><br>
> html translate: 'text to translate'<br>
> html translate: 'other text to translate' to: aWALocale<br>
><br>
> which renders the translation. This has the problem that is doesn't<br>
> work for attributes, I'll need to come up with a solution for this,<br>
> API proposals are welcome.<br>
><br>
> Gettext Workflow:<br>
> 1. write your application using the API above<br>
> 2. register your domain. A domain is a way to group strings, you might<br>
> have Pier and a reporting application running in the same image and<br>
> want each to use it's own dictionary:<br>
> TextDomainManager registerCategoryPrefix: 'Seaside-Gettext-Examples'<br>
> domain: 'gettext'<br>
> 3. export the template<br>
> WAGetTextExporter new exportTemplate<br>
> 4. create the translation files e.g. using poedit [2]<br>
> 5. put the translation files in locale/<locale>/LC_MESSAGES/<domain>.(po|mo)<br>
> 6. done<br>
><br>
> One of the nice things about gettext is that there are external tools<br>
> like poedit [2] to manage the translation files which you can give to<br>
> your translators. No more need to mess around with Excel. There are<br>
> also tools [3] that display how much of your application is already<br>
> translated.<br>
><br>
> [1] <a href="http://www.squeaksource.com/Seaside29Addons" target="_blank">http://www.squeaksource.com/Seaside29Addons</a><br>
<br>
</div></div>That's now:<br>
<a href="http://www.squeaksource.com/Seaside30Addons" target="_blank">http://www.squeaksource.com/Seaside30Addons</a><br>
<br>
Cheers<br>
Philippe<br>
_______________________________________________<br>
seaside-dev mailing list<br>
<a href="mailto:seaside-dev@lists.squeakfoundation.org">seaside-dev@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev</a><br>
</blockquote></div><br>