Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
White_Owl is currently offline  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?
Re: GetNativeLangName returns English for non-english languages [message #19770 is a reply to message #19762] Fri, 16 January 2009 09:24 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, why not.

In reality, I do not like LanguageInfo classes too much and I guess it should be replaced by something more useful, but for now...

Mirek
Previous Topic: GetLanguageCode
Next Topic: Basic character set analyzer
Goto Forum:
  


Current Time: Fri Apr 19 23:23:15 CEST 2024

Total time taken to generate the page: 0.02581 seconds