Translating Squeak
Diego Gomez Deck
DiegoGomezDeck at ConsultAr.com
Tue Apr 30 09:17:29 UTC 2002
Hello list!
Translating the eToys vocabulary to spanish, I found (like many people do) that *too* many thinks get not tranlation with the current translation-support.
We need a more complete solution to this problem. I propose to atack it in 2 fronts:
1) String
2) Date, Time and Number
For 1) I created some methods in String (and a class variable named Languages and a few class methods to initialize and fill it)
String>>translated
^ self translatedTo: World currentNaturalLanguage
String>>translatedTo: languageSymbol
| language |
language := Languages
at: languageSymbol
ifAbsent:[Transcipt show:'*Language: ', languageSymbol, ' not present!'; cr.
^ self].
^ language
at: self
ifAbsent:[Transcipt show:'*Sentence:', self, ' not present!'; cr.
self]
I took the Browser class and added #translated message to all hard-code strings. Then, watching in the Transcript for warnings about missing sentences, I translated the complete browser in just 1/2 hour.
Example:
Browser>>defaultBrowserTitle
^ 'System Browser' translated
This mechanism could be not the best, but we need regionalized Squeaks to teach kids (or kids to teach us :)...
I'd like to hear your comments...
Cheers,
Diego Gomez Deck
More information about the Squeak-dev
mailing list
|