[arch-projects] projects
Andy Roberts
dev at andy-roberts.net
Thu Mar 31 13:48:43 EST 2005
Jason Chu wrote:
>>And then there's internationalization...
>>
>>
>
>I'd suggest worrying about one language before taking them all on...
>
>
>
I18n isn't that hard. One of my projects is an Arabic concordancer. A
concordancer is a simple tool that loads a large text file, say the
complete works of Shakespeare, and then allows the user to search for a
word or phrase. The concordance is then the target word in its context.
It is used by linguists to understand how words behave, and especially
lexographers when defining new words, etc.
The problem is, the ones that exist don't cope with Arabic correctly
(due to its right-to-left nature). I have a number of Arabic colleagues
who need such a tool, so I've been obliging. Anyway, I can't read or
speak Arabic, but creating such a tool, and adding i18n functionality
has been really simple (in Java at least). Basically, all strings that
would appear in your interface are stored in an external text file of
"key = value" pairs. You have a separate file per language supported
(these files are known as ResourceBundles and share the same name except
they have a unique locale suffix) where the keys are the same, but the
values are language specific. You need to load the Bundle in each class
that needs these labels, but Java will load the appropriate language
bundle depending on the current locale.
'Tis really easy. Anyway, despite this mass exodus of the forums, I hope
that the Java experts will keep reading the Programming board, as I have
some more Swing questions in the pipeline :P
arooaroo
More information about the arch-projects
mailing list