Multilanguage applications

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

Multilanguage applications

Fernando Rodríguez
Hi,

Is there some tutorial on creating multilanguage apps (with all the
resources in English, Spanish, etc...) with Dolphin?

Thanks


Reply | Threaded
Open this post in threaded view
|

Re: Multilanguage applications

Janos Kazsoki
Hi,

to make internationalization easier would be very interesting for me
too because of german, hungarian...

Well, at the beginning I can imagine a simple start, like collecting
all strings and "characters" into a common place (dictinaries?), which
could then be translated (similar to Java bundles solution), where the
key is the original english string (EN_gb) and the value is the DE_de,
or EN_us translated version. It would be already a big help. I also
made of thoughts about localizing error messages too, like "does not
understand" and so on, because for a let's say german school kid as
enduser of an application it does not say very much...

And later perhaps more sophisticated i18n transformations, like for ex.
in the case of date:
1.13.2005 2:00 PM should be in a german application 13.1.2005 14:00,
and in a hungarian one 2005.1.13 14:00
Any hints would be appreciated.

Many thanks in advance,
Janos


Reply | Threaded
Open this post in threaded view
|

Re: Multilanguage applications

Esteban A. Maringolo-2
Janos Kazsoki escribió:

> And later perhaps more sophisticated i18n transformations, like for ex.
> in the case of date:
> 1.13.2005 2:00 PM should be in a german application 13.1.2005 14:00,
> and in a hungarian one 2005.1.13 14:00
> Any hints would be appreciated.

AFAIR, the dates can be, and indeed they are, displayed using system
locale. To read back you can use #readFrom: which uses the current
locale, there is a #readFrom:format: if I remember well.

Best regards

--
Esteban A. Maringolo
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Multilanguage applications

Fernando Rodríguez
In reply to this post by Janos Kazsoki
On 13 Jan 2005 09:35:56 -0800, "Janos Kazsoki" <[hidden email]>
wrote:

>Hi,
>
>to make internationalization easier would be very interesting for me
>too because of german, hungarian...
>
>Well, at the beginning I can imagine a simple start, like collecting
>all strings and "characters" into a common place (dictinaries?), which

I currently use, for a non-smalltalk app, windows resource files.
These are plain text files that can be preprocessed before being
'added' to the application's exe.  You read the strings or byte
streams with some API functions.

However, I'm planning to write a smalltalk app that should be
multiplatform, so using a windows only facility won't work.

Maybe using dictionaries is the way to go, but Id' rather use
something in plain text and with a simple (and I mean simple) syntax,
so even translators can use it. };-)

>And later perhaps more sophisticated i18n transformations, like for ex.
>in the case of date:
>1.13.2005 2:00 PM should be in a german application 13.1.2005 14:00,
>and in a hungarian one 2005.1.13 14:00

I'm sure Dolphin uses the windows api for that sort of thing, so it
probably already comes in your locale. Testing it is easy, just change
your language in the Control panel and how the dates look like.


Reply | Threaded
Open this post in threaded view
|

Re: Multilanguage applications

Christopher J. Demers
"Fernando" <[hidden email]> wrote in message
news:[hidden email]...
> On 13 Jan 2005 09:35:56 -0800, "Janos Kazsoki" <[hidden email]>
...
> Maybe using dictionaries is the way to go, but Id' rather use
> something in plain text and with a simple (and I mean simple) syntax,
> so even translators can use it. };-)
...

I used a dictionary based approach, I then wrote a translation interface
that can be launched from the program.  I can build the dictionary on the
fly as the program runs, but I also wrote some code to extract all
translatable text from views and methods to ensure good coverage.  I also
added a MiXeD CaSe translation generator for testing so I could visually
check that all important text was going to be translatable.  I am fairly
happy with the way it turned out.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Multilanguage applications

Fernando Rodríguez
On Thu, 13 Jan 2005 16:56:36 -0500, "Christopher J. Demers"
<[hidden email]> wrote:


>I used a dictionary based approach, I then wrote a translation interface
>that can be launched from the program.  I can build the dictionary on the
>fly as the program runs, but I also wrote some code to extract all
>translatable text from views and methods to ensure good coverage.  I also
>added a MiXeD CaSe translation generator for testing so I could visually
>check that all important text was going to be translatable.  I am fairly
>happy with the way it turned out.

Willing to share? O:-)


Reply | Threaded
Open this post in threaded view
|

Re: Multilanguage applications

Christopher J. Demers
"Fernando" <[hidden email]> wrote in message
news:[hidden email]...

> On Thu, 13 Jan 2005 16:56:36 -0500, "Christopher J. Demers"
> <[hidden email]> wrote:
>>I used a dictionary based approach, I then wrote a translation interface
>>that can be launched from the program.  I can build the dictionary on the
>>fly as the program runs, but I also wrote some code to extract all
>>translatable text from views and methods to ensure good coverage.  I also
>>added a MiXeD CaSe translation generator for testing so I could visually
>>check that all important text was going to be translatable.  I am fairly
>>happy with the way it turned out.
>
> Willing to share? O:-)

Unfortunately I can't, it was developed for a commercial software program.
However it was not really that difficult to actually implement.  The
important part was knowing where to find things.  Here are some tips:

The Presenter class event #viewOpened: is useful for launching the
translation of presenters.
To translate the menus I found that I had remove the items, translate them,
and then add them back.
I used CompiledMethod<<parseTree to scan for dynamically translatable text.
I then did lots of experimentation until I got the results I desired.  It
was actually quite fun and came together faster than I expected.

Good luck,
Chris