Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Localisation clarifications
Localisation clarifications [message #5425] |
Thu, 21 September 2006 08:18 |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
I have read the thread:
http://www.arilect.com/upp/forum/index.php?t=msg&th=1017 &start=0&
So I added a .t file (read that too literally, so eventually renamed it to lang.t). Added Swedish (seSV) and Japanese (jaJP), and Synchronised. This all looked good.
For example, I ended up with:
T_("File")
jaJP("フィル")
svSE("Fil")
T_("About")
jaJP("について")
svSE("Beskriv")
I then use:
SetLanguage(LNG_('S','V','S','E'));
And I use it:
void UFxp::MainMenu(Bar& bar){
bar.Add(t_("File"),THISBACK(FileMenu));
}
void UFxp::FileMenu(Bar& bar){
bar.Add(t_("About"),THISBACK(do_About));
}
And for some reason, my "File" menu is still "File", but "About" actually turns up in Swedish. In Japanese I just get square boxes, presumably as it uses the wrong font.
What I am curious about is, why would you want to use SetLanguage in your code? Should it not use the Environment variables to decide which locate is preferred? If I always pick SetLanguage(ENGLISH), would that not break the idea that anyone can do .tr files to add their own locale to an application?
Is SetLanguage really supposed to be used if I have a Language> menu, and let users pick a language that way? Ie, I should leave it alone, and only set it if I chose to offer an option to set languages.
Should I be able to set LANG to seSV.UTF-8 or jaJP.UTF-8 and have my application use that language?
|
|
|
Goto Forum:
Current Time: Fri Apr 19 22:22:11 CEST 2024
Total time taken to generate the page: 0.03528 seconds
|