[Squeak-fr] Internationalization and MenuItemMorph ?

Samir Saidani squeak-fr@lists.squeakfoundation.org
Wed, 20 Nov 2002 17:21:10 +0100


--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable


Hello,

I write a little piece of code to explore the possibilities of
translating MenuItemMorph in other languages.
I choose a translation word by word by using a Dictionary, and add
the possibility to do an exact translation. (see the method class
translateEnglishToFrench: in MenuItemMorph)
Why ?
Because for a lot of examples, a translation word by word fits our
need, for instance : "inspect class" gives in french "inspecter classe".
So we have only to specify : 'inspect' -> 'inspecter' and=20
'class' -> 'classe'.
But for several examples, it's impossible. For instance :
'previous project' gives 'projet pr=E9c=E9dent'. The adjective is after
the noun in french... Maybe we can imagine an implementation of
translateEnglishToFrench/Deutsch... with some basic rules of grammar.

I'm not sure that it's a good choice of implementation, but I give
this piece of code to start a debate around menus internationalization
(I quicly look at the implementation of etoys item translation, but it
seems to be an exact translation : I think that squeak can do
something smarter...).

By the way, it's impossible to translate "window" by "fen=EAtre" because of
the lack of "=EA" (^ is bound to up arrow :-( )

If you play with it, you will see a problem due to the use of
copyReplaceAll. I let you discover it ;-)

Regards

Samir

--=20
Samir SAIDANI=09=09=09=09
PhD in CS / Doctorant en informatique 		web : http://www.info.unicaen.fr/~s=
aidani
Universite de Caen - Laboratoire GREYC          tel : 02-31-56-74-30
Equipe MAD - Campus II - 14032 Caen Cedex       fax : 02-31-56-76-30


--=-=-=
Content-Type: application/zip
Content-Disposition: attachment;
  filename=MenuItemMorph-EnglishToFrenchTranslation.zip
Content-Transfer-Encoding: base64

UEsDBBQAAAAIANoMcy1dAgLQQQYAAOwOAAArABUATWVudUl0ZW1Nb3JwaC1FbmdsaXNoVG9GcmVu
Y2hUcmFuc2xhdGlvbi5zdFVUCQADG4jZPSyI2T1VeAQAlBMyAK1XS28cNww++zD/gXYPax+yySZp
0izQFgXSAC2QIqgD9BAkgWaGs6tYK030WNttes9pf3NJiZpd22lRoD0MMKQoivr41OyFdxs4/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