Localization in code
Richard A. O'Keefe
ok at atlas.otago.ac.nz
Fri Sep 28 01:15:49 UTC 2001
"Andreas Raab" <Andreas.Raab at gmx.de> wrote:
'The value of <name> is <value>'
printWith: {#name. 'cargo'. #value. cargo}.
Wouldn't
#('The value of ' name ' is ' value '.')
printWith: {#name -> 'cargo'. #value -> cargo}.
or
#('The value of ' name ' is ' value '.')
printWith: #name -> 'cargo'
with: #value -> cargo.
be more Smalltalky (Smalltalkish?).
I rather like having messages in separate files because
+ You can give them to someone to translate who doesn't have to know
about the programming language involved.
+ A program can dynamically switch languages (quite handy when a
lecturer's preferred language isn't the same as a student's preferred
language).
+ Variant: the same image can provide messages in English when run by me
or Maori, Chinese, whatever when run by a student who'd prefer that.
(Yeah, dream on...) The student wouldn't have to start a different image
or load a special change-set.
+ Messages only have to be edited in one place however many places they
are used.
Any technique which can do the same would be as welcome.
(Just because a student is good at English doesn't mean he or she wouldn't
rather work in his or her own language.)
Ideally, we'd have a natural language generation system rather like ILEX
so that no translation as such would be involved at all. That kind of
stuff is getting _very_ close to ready for use.
More information about the Squeak-dev
mailing list
|