Janko Mivšek | 12 May 12:20

Localization - a proposal

Dear all,

With Nico we just had a long IRC brainstorming about how to do 
localization support in Aida. Here is the proposal:

	e addText: #fr->'Salut'

So, all texts are added as associations with initial language as a key 
and text in that language as value. Such association then implies that 
this text can be later shown in many languages as soon as translations 
are provided.

And how will translations be done?

In two ways: in-line directly on the web page or in special web app with 
the translation table. In-line will be preferable for translators, 
because they will see the complete context in which the text resides.

Scope of i18 texts:

Question is how to do translations of apps wich are usually made of 
reusable web elements/components. Shall we provide some global message 
catalog as is in case of GetText? Such a global catalog is hard to 
maintain if there is a lot of text. But it avoids duplicates. Our 
proposal is not to have global but a local message catalogs, one per 
each element generating method in WebComponent/WebApp.   Yes, there will 
be a lot of duplication of translations that way but this is still much 
simpler to translate and maintain than some global catalog. Also keep in 
mind that we translate reusable components, which will reduce duplicate 
translation work at the end.
(Continue reading)

Rob Rothwell | 12 May 12:38

Re: Localization - a proposal

On Mon, May 12, 2008 at 6:21 AM, Janko Mivšek <janko.mivsek <at> eranova.si> wrote:

That's it, a proposal, now it is turn on you for comments.

Will it still be possible to work in "non-localized" mode this way?

e: addText: 'Salut'.

Or, could you set a default association:

e defaultLanguage: #fr

Or better yet

MyApp defaultLanguage: #fr

Which would signal elements to use the #fr association for any non-specified language reference?

Just wondering...

Rob
<div>
<p>On Mon, May 12, 2008 at 6:21 AM, Janko Miv&scaron;ek &lt;<a href="mailto:janko.mivsek <at> eranova.si">janko.mivsek <at> eranova.si</a>&gt; wrote:<br></p>
<div class="gmail_quote"><blockquote class="gmail_quote">
That's it, a proposal, now it is turn on you for comments.<br>
</blockquote></div>
<br>Will it still be possible to work in "non-localized" mode this way?<br><br>e: addText: 'Salut'.<br><br>Or, could you set a default association:<br><br>e defaultLanguage: #fr<br><br>
Or better yet<br><br>MyApp defaultLanguage: #fr<br><br>Which would signal elements to use the #fr association for any non-specified language reference?<br><br>Just wondering...<br><br>Rob<br>
</div>
Janko Mivšek | 12 May 13:05

Re: Localization - a proposal

Rob Rothwell wrote:

> Will it still be possible to work in "non-localized" mode this way?
> 
> e: addText: 'Salut'.

Yes, normal text stay same as now. You switch to "localized" text when 
you change it into an association. And you can do that later when you 
need, which is also an advantage of this approach. You can start with 
usual text in the code and later just change it to the association and 
voila, your app is internationalized!

> Or, could you set a default association:
> 
> e defaultLanguage: #fr
> 
> Or better yet
> 
> MyApp defaultLanguage: #fr
> 
> Which would signal elements to use the #fr association for any 
> non-specified language reference?

I wouldn't complicate much further. If you don't have that text 
associations, your text is simply part of your code. In any language you 
wish. But when a need arises to support more than one language, you need 
to upgrade that text to associations. And this upgrade is simple.

Janko

--

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
Aida <at> aidaweb.si
http://lists.aidaweb.si/mailman/listinfo/aida

Gmane