Multilingual applications in Cuis

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Multilingual applications in Cuis

garduino
Hi Guys:

I'm in the early stage of development of my first commercial project
in Cuis and I would like to offer it in, at least, spanish and english
and, hopefully, in more languages with an easy way of add new
languages.

Are you thinking in some feature/framework to accomplish these goals in Cuis?

--
Sincerely,
Germán Arduino
about.me/garduino

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

Janko Mivšek
Hi Germán,

Dne 28. 01. 2013 17:49, piše Germán Arduino:

> I'm in the early stage of development of my first commercial project
> in Cuis and I would like to offer it in, at least, spanish and english
> and, hopefully, in more languages with an easy way of add new
> languages.
>
> Are you thinking in some feature/framework to accomplish these goals in Cuis?

In Aida there is a multilingual support including later translation
support of your web app to different languages.

If you put your text directly in your code, you can later make it
translatable easily by changing it to a literal association, with
language code of original text as key and original text as value. For
instance:

Original code looks like:

        e addText: 'Bonjour'

To enable it to become multilingual:

    e addText: #fr->'Bonjour'.

Ok, so far nothing happened on this page, there is still Bonjour, but
this text now became in-line editable (if your session is in translation
mode). So, to translate this text in Spanish, you would first change
default language of your session to Spanish:

        http://localhost:8888/myapp?language=es

Now click to edit that Bonjour to Hola and that's it. Aida goal namely
is to make as simple as possible for translators to translate your web
app in other languages.

Translations are stored on the class side of App classes, so they are
easily maintained through regular Smalltalk source code systems.

More on http://www.aidaweb.si/translation%20support

Best regards
Janko



--
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

garduino
Thanks Janko!

Interesting feature of Aida, I will take it in account certainly.


In this case I was asking more focused in desktop app, because I'm
thinking in a complete rewrite of my
password manager, but will be a desktop app.

Germán.

2013/1/28 Janko Mivšek <[hidden email]>:

> Hi Germán,
>
> Dne 28. 01. 2013 17:49, piše Germán Arduino:
>
>> I'm in the early stage of development of my first commercial project
>> in Cuis and I would like to offer it in, at least, spanish and english
>> and, hopefully, in more languages with an easy way of add new
>> languages.
>>
>> Are you thinking in some feature/framework to accomplish these goals in Cuis?
>
> In Aida there is a multilingual support including later translation
> support of your web app to different languages.
>
> If you put your text directly in your code, you can later make it
> translatable easily by changing it to a literal association, with
> language code of original text as key and original text as value. For
> instance:
>
> Original code looks like:
>
>         e addText: 'Bonjour'
>
> To enable it to become multilingual:
>
>     e addText: #fr->'Bonjour'.
>
> Ok, so far nothing happened on this page, there is still Bonjour, but
> this text now became in-line editable (if your session is in translation
> mode). So, to translate this text in Spanish, you would first change
> default language of your session to Spanish:
>
>         http://localhost:8888/myapp?language=es
>
> Now click to edit that Bonjour to Hola and that's it. Aida goal namely
> is to make as simple as possible for translators to translate your web
> app in other languages.
>
> Translations are stored on the class side of App classes, so they are
> easily maintained through regular Smalltalk source code systems.
>
> More on http://www.aidaweb.si/translation%20support
>
> Best regards
> Janko
>
>
>
> --
> Janko Mivšek
> Aida/Web
> Smalltalk Web Application Server
> http://www.aidaweb.si
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

Juan Vuletich-4
Hi Germán,

For a desktop app, Squeak includes #translated, and the necessary
functionality. The code is not complex, and it could be easily turned
into an optional package for Cuis.

Cheers,
Juan Vuletich

Germán Arduino wrote:

> Thanks Janko!
>
> Interesting feature of Aida, I will take it in account certainly.
>
>
> In this case I was asking more focused in desktop app, because I'm
> thinking in a complete rewrite of my
> password manager, but will be a desktop app.
>
> Germán.
>
> 2013/1/28 Janko Mivšek <[hidden email]>:
>  
>> Hi Germán,
>>
>> Dne 28. 01. 2013 17:49, piše Germán Arduino:
>>
>>    
>>> I'm in the early stage of development of my first commercial project
>>> in Cuis and I would like to offer it in, at least, spanish and english
>>> and, hopefully, in more languages with an easy way of add new
>>> languages.
>>>
>>> Are you thinking in some feature/framework to accomplish these goals in Cuis?
>>>      
>> In Aida there is a multilingual support including later translation
>> support of your web app to different languages.
>>
>> If you put your text directly in your code, you can later make it
>> translatable easily by changing it to a literal association, with
>> language code of original text as key and original text as value. For
>> instance:
>>
>> Original code looks like:
>>
>>         e addText: 'Bonjour'
>>
>> To enable it to become multilingual:
>>
>>     e addText: #fr->'Bonjour'.
>>
>> Ok, so far nothing happened on this page, there is still Bonjour, but
>> this text now became in-line editable (if your session is in translation
>> mode). So, to translate this text in Spanish, you would first change
>> default language of your session to Spanish:
>>
>>         http://localhost:8888/myapp?language=es
>>
>> Now click to edit that Bonjour to Hola and that's it. Aida goal namely
>> is to make as simple as possible for translators to translate your web
>> app in other languages.
>>
>> Translations are stored on the class side of App classes, so they are
>> easily maintained through regular Smalltalk source code systems.
>>
>> More on http://www.aidaweb.si/translation%20support
>>
>> Best regards
>> Janko
>>
>>
>>
>> --
>> Janko Mivšek
>> Aida/Web
>> Smalltalk Web Application Server
>> http://www.aidaweb.si
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>    
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>  


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

garduino
Yes, if I don't bad remember is a work coming from 3.8, from Diego GD.

I forgot the details, but I will search a bit.

Thanks for the point.

2013/1/28 Juan Vuletich <[hidden email]>:

> Hi Germán,
>
> For a desktop app, Squeak includes #translated, and the necessary
> functionality. The code is not complex, and it could be easily turned into
> an optional package for Cuis.
>
> Cheers,
> Juan Vuletich
>
>
> Germán Arduino wrote:
>>
>> Thanks Janko!
>>
>> Interesting feature of Aida, I will take it in account certainly.
>>
>>
>> In this case I was asking more focused in desktop app, because I'm
>> thinking in a complete rewrite of my
>> password manager, but will be a desktop app.
>>
>> Germán.
>>
>> 2013/1/28 Janko Mivšek <[hidden email]>:
>>
>>>
>>> Hi Germán,
>>>
>>> Dne 28. 01. 2013 17:49, piše Germán Arduino:
>>>
>>>
>>>>
>>>> I'm in the early stage of development of my first commercial project
>>>> in Cuis and I would like to offer it in, at least, spanish and english
>>>> and, hopefully, in more languages with an easy way of add new
>>>> languages.
>>>>
>>>> Are you thinking in some feature/framework to accomplish these goals in
>>>> Cuis?
>>>>
>>>
>>> In Aida there is a multilingual support including later translation
>>> support of your web app to different languages.
>>>
>>> If you put your text directly in your code, you can later make it
>>> translatable easily by changing it to a literal association, with
>>> language code of original text as key and original text as value. For
>>> instance:
>>>
>>> Original code looks like:
>>>
>>>         e addText: 'Bonjour'
>>>
>>> To enable it to become multilingual:
>>>
>>>     e addText: #fr->'Bonjour'.
>>>
>>> Ok, so far nothing happened on this page, there is still Bonjour, but
>>> this text now became in-line editable (if your session is in translation
>>> mode). So, to translate this text in Spanish, you would first change
>>> default language of your session to Spanish:
>>>
>>>         http://localhost:8888/myapp?language=es
>>>
>>> Now click to edit that Bonjour to Hola and that's it. Aida goal namely
>>> is to make as simple as possible for translators to translate your web
>>> app in other languages.
>>>
>>> Translations are stored on the class side of App classes, so they are
>>> easily maintained through regular Smalltalk source code systems.
>>>
>>> More on http://www.aidaweb.si/translation%20support
>>>
>>> Best regards
>>> Janko
>>>
>>>
>>>
>>> --
>>> Janko Mivšek
>>> Aida/Web
>>> Smalltalk Web Application Server
>>> http://www.aidaweb.si
>>>
>>> _______________________________________________
>>> Cuis mailing list
>>> [hidden email]
>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>
>>
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

Hannes Hirzel
In reply to this post by Juan Vuletich-4
Hello Germán and Juan

On 1/29/13, Juan Vuletich <[hidden email]> wrote:
> Hi Germán,
>
> For a desktop app, Squeak includes #translated, and the necessary
> functionality. The code is not complex, and it could be easily turned
> into an optional package for Cuis.

It would be good to have an external package which deals with strings
constants and translations of it.

There is a class category in Squeak 4.4
    'GetText-Localization'

with the classes
    MOFile
    GetTextTranslator
    TextDomainManager  (a Singleton)

However it seems that the code is etoys specific

see for example method
   domainForClass: aClass
        ^'etoys'

TextDomainManager class


Accessing translated strings goes through


String>>translated
        "answer the receiver translated to the default language"
        | translation |
        translation := self
                translatedTo: LocaleID current
                inDomain: (TextDomainManager domainOfMethod: thisContext sender method).
        self == translation ifTrue: [^self translatedInAllDomains].
        ^translation

And a class

  NaturalLanguageTranslator in the category

SystemLocalization (an abstract class of natural language translators,
all implemented as singletons).
is involved as well.

The gettext apporach http://en.wikipedia.org/wiki/GNU_gettext is used.

I would not call the Squeak implementation particularly simple and it
seems to be incomplete. I think it would be good to have it rewritten
for Cuis.

--Hannes

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

Juan Vuletich-4
H. Hirzel wrote:
> Hello Germán and Juan
> ...
>
> I would not call the Squeak implementation particularly simple and it
> seems to be incomplete. I think it would be good to have it rewritten
> for Cuis.
>
> --Hannes
>  

If someone is willing to work on this, some suggestions:
- Use the Trie class in Cuis. It is fast, compact and efficient.
- Call Google translate to fill missing entries
- Maybe include some form of punctuation on the quality of the
translation. For instance, an automatic translation should have low
score, and a translation that has been checked by several people should
have a high score.
- Please call my native tongue "Castilian" or "Castellano" and not the
incorrect "Spanish" or "Español".

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

garduino
I'm not sure of understand the whole idea ... but certainly this is a
topic that I will check sooner or later....

2013/1/29 Juan Vuletich <[hidden email]>:

> H. Hirzel wrote:
>>
>> Hello Germán and Juan
>> ...
>>
>>
>> I would not call the Squeak implementation particularly simple and it
>> seems to be incomplete. I think it would be good to have it rewritten
>> for Cuis.
>>
>> --Hannes
>>
>
>
> If someone is willing to work on this, some suggestions:
> - Use the Trie class in Cuis. It is fast, compact and efficient.
> - Call Google translate to fill missing entries
> - Maybe include some form of punctuation on the quality of the translation.
> For instance, an automatic translation should have low score, and a
> translation that has been checked by several people should have a high
> score.
> - Please call my native tongue "Castilian" or "Castellano" and not the
> incorrect "Spanish" or "Español".
>
> Cheers,
> Juan Vuletich
>
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

Hannes Hirzel
Hello  Germán

I think for your project a Cuis only solution is probably fine. It is
about managing strings and their translations. To do this in Smalltalk
for a small number of strings (let's say less than 500) is relatively
straightforward.

Squeak has an interface to the GNU Gettext PO (Portable Object) file
format. If you do not need this things become simple.

You may maintain the content in code.

HTH

Hannes



On 1/30/13, Germán Arduino <[hidden email]> wrote:

> I'm not sure of understand the whole idea ... but certainly this is a
> topic that I will check sooner or later....
>
> 2013/1/29 Juan Vuletich <[hidden email]>:
>> H. Hirzel wrote:
>>>
>>> Hello Germán and Juan
>>> ...
>>>
>>>
>>> I would not call the Squeak implementation particularly simple and it
>>> seems to be incomplete. I think it would be good to have it rewritten
>>> for Cuis.
>>>
>>> --Hannes
>>>
>>
>>
>> If someone is willing to work on this, some suggestions:
>> - Use the Trie class in Cuis. It is fast, compact and efficient.
>> - Call Google translate to fill missing entries
>> - Maybe include some form of punctuation on the quality of the
>> translation.
>> For instance, an automatic translation should have low score, and a
>> translation that has been checked by several people should have a high
>> score.
>> - Please call my native tongue "Castilian" or "Castellano" and not the
>> incorrect "Spanish" or "Español".
>>
>> Cheers,
>> Juan Vuletich
>>
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Multilingual applications in Cuis

Hannes Hirzel
P.S. The idea of having a special message to mark strings which you
might want to be available as translated strings is useful


From the Squeak implementation

String>>translated

translated
        "answer the receiver translated to the default language"
        | translation |
        translation := self
                translatedTo: LocaleID current
                inDomain: (TextDomainManager domainOfMethod: thisContext sender method).
        self == translation ifTrue: [^self translatedInAllDomains].
        ^translation


However your implementation might be different.

Having a string in a domain means that ambiguities may be avoided.


Useful link: https://codex.wordpress.org/I18n_for_WordPress_Developers

On 1/31/13, H. Hirzel <[hidden email]> wrote:

> Hello  Germán
>
> I think for your project a Cuis only solution is probably fine. It is
> about managing strings and their translations. To do this in Smalltalk
> for a small number of strings (let's say less than 500) is relatively
> straightforward.
>
> Squeak has an interface to the GNU Gettext PO (Portable Object) file
> format. If you do not need this things become simple.
>
> You may maintain the content in code.
>
> HTH
>
> Hannes
>
>
>
> On 1/30/13, Germán Arduino <[hidden email]> wrote:
>> I'm not sure of understand the whole idea ... but certainly this is a
>> topic that I will check sooner or later....
>>
>> 2013/1/29 Juan Vuletich <[hidden email]>:
>>> H. Hirzel wrote:
>>>>
>>>> Hello Germán and Juan
>>>> ...
>>>>
>>>>
>>>> I would not call the Squeak implementation particularly simple and it
>>>> seems to be incomplete. I think it would be good to have it rewritten
>>>> for Cuis.
>>>>
>>>> --Hannes
>>>>
>>>
>>>
>>> If someone is willing to work on this, some suggestions:
>>> - Use the Trie class in Cuis. It is fast, compact and efficient.
>>> - Call Google translate to fill missing entries
>>> - Maybe include some form of punctuation on the quality of the
>>> translation.
>>> For instance, an automatic translation should have low score, and a
>>> translation that has been checked by several people should have a high
>>> score.
>>> - Please call my native tongue "Castilian" or "Castellano" and not the
>>> incorrect "Spanish" or "Español".
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>>
>>> _______________________________________________
>>> Cuis mailing list
>>> [hidden email]
>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org