J2ME internationalization  
Author Message
Chameleon





PostPosted: 2006-10-15 23:17:00 Top

java-programmer, J2ME internationalization I want to provide the binary with *only one* language, because I want to
be as small as I can.

But I want to provide many binaries (one per language).

So, I write the code with hardcoded strings like "$_nearest_dist_$".
I write a file like:
-----english.ini----
$_nearest_dist_$=Nearest distance is 90m
--------------------
and I write a php script which in *.java files, replaces all strings in
form "$_*_$" with language correct string.
php phpWriteStringsToSource.php <project_folder> <language.ini>

THE BIG PROBLEM: I realize that *.java files must have ansi* encoding!
Any of utf-8, uc16le or be is not compiled correct!

So, what I can do?
 
Daniel Dyer





PostPosted: 2006-10-15 23:25:00 Top

java-programmer >> J2ME internationalization On Sun, 15 Oct 2006 16:16:55 +0100, Chameleon <email***@***.com> wrote:

> THE BIG PROBLEM: I realize that *.java files must have ansi* encoding!
> Any of utf-8, uc16le or be is not compiled correct!
>
> So, what I can do?

Not true, take a look at the -encoding switch for javac.

Dan.

--
Daniel Dyer
http://www.uncommons.org