Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » GetNativeLangName returns English for non-english languages
GetNativeLangName returns English for non-english languages [message #19762] |
Wed, 14 January 2009 20:12 |
White_Owl
Messages: 27 Registered: January 2009 Location: New York
|
Promising Member |
|
|
I was very surprised when GetNativeLangName() returned English for another language. I did some investigation of uppsrc/Core/Lang.cpp and came up with some additions to it. To show native language names for Russian and Ukrainian, we should add this:
class LanguageInfoRU : public LanguageInfo
{
public:
LanguageInfoRU()
: LanguageInfo(LNG_('R', 'U', 'R', 'U'))
{
english_name = "Russian";
native_name = "\xD0\xA0\xD1\x83\xD1\x81\xD1\x81\xD0\xBA\xD0\xB8\xD0\xB9";
}
};
class LanguageInfoUK : public LanguageInfo
{
public:
LanguageInfoUK()
: LanguageInfo(LNG_('U', 'K', 'U', 'A'))
{
english_name = "Ukrainian";
native_name = "\xD0\xA3\xD0\xBA\xD1\x80\xD0\xB0\xD1\x97\xD0\xBD\xD1\x81\xD1\x8C\xD0\xBA\xD0\xB0";
}
};
And we should register these two languages in const LanguageInfo& GetLanguageInfo(int lcode){}
Also, when I compile Lang.cpp with -Wall (gnuc) it yells a lot of warnings about comparison between signed and unsigned expressions. Should not we fix that?
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 17:18:49 CEST 2024
Total time taken to generate the page: 0.03936 seconds
|