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. Where are translations stored? By default directly in class methods of each WebApp or WebComponent subclass in a protocol 'translations'. This approach is similar to method images, that is images directly in methods and have the same advantages - translations can be stored together with the code in version systems. Later we can add some WebTranslations class (like WebStyle). That's it, a proposal, now it is turn on you for comments. Janko -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
On Mon, May 12, 2008 at 6:21 AM, Janko Mivšek <[hidden email]> 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 _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
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 [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |