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 » more complete lang.cpp
icon7.gif  more complete lang.cpp [message #23659] Wed, 11 November 2009 09:40 Go to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
i've added half languages' own classes. though many native names are still in english, i think it helps.
if this is right, i'll go on to add all of them.
  • Attachment: Lang.cpp
    (Size: 40.48KB, Downloaded 461 times)
Re: more complete lang.cpp [message #23662 is a reply to message #23659] Wed, 11 November 2009 17:15 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
bonami wrote on Wed, 11 November 2009 09:40

i've added half languages' own classes. though many native names are still in english, i think it helps.
if this is right, i'll go on to add all of them.


Hello Bonami

I enclose you here some fixes for native names and I have added Basque language.

For example:
Original
native_name = ToUnicode("Espagnnol", CHARSET_WIN1250);

Fixed text
"Español"

Best regards
Koldo

english_name = "French";	native_name = "\x46\x72\x61\x6E\xC3\xA7\x61\x69\x73";		
"Français"
	
native_name = ToUnicode("Belge Francais", CHARSET_DEFAULT);
"Français de Belgique"

native_name = ToUnicode("Canadian Francais", CHARSET_DEFAULT);
"Français Canadien"

native_name = ToUnicode("Swiss Francais", CHARSET_DEFAULT);
"Français Suisse"

native_name = ToUnicode("Luxemburgisch Francais", CHARSET_DEFAULT);
"Français Luxembourgeois"

native_name = ToUnicode("Swiss Italiano", CHARSET_DEFAULT);
"Svizzera italiana"

native_name = ToUnicode("Espagnnol", CHARSET_WIN1250);
"Español"

native_name = ToUnicode("Mexican Espagnnol", CHARSET_WIN1250);
"Español mexicano"

native_name = ToUnicode("Guatemalan Espagnnol", CHARSET_WIN1250);
"Español guatemalteco"

native_name = ToUnicode("Costa Rican Espagnnol", CHARSET_WIN1250);
"Español costarricense"

native_name = ToUnicode("Panamanian Espagnnol", CHARSET_WIN1250);
"Español panameño"

native_name = ToUnicode("Dominican Espagnnol", CHARSET_WIN1250);
"Español dominicano"

native_name = ToUnicode("Venezuelan Espagnnol", CHARSET_WIN1250);
"Español venezolano"

native_name = ToUnicode("Colombian Espagnnol", CHARSET_WIN1250);
"Español colombiano"

native_name = ToUnicode("Peruvian Espagnnol", CHARSET_WIN1250);
"Español peruano"

native_name = ToUnicode("Argentinian Espagnnol", CHARSET_WIN1250);
"Español argentino"

native_name = ToUnicode("Ecuadorian Espagnnol", CHARSET_WIN1250);
"Español ecuatoriano"

native_name = ToUnicode("Chilian Espagnnol", CHARSET_WIN1250);
"Español chileno"

native_name = ToUnicode("Uruguayan Espagnnol", CHARSET_WIN1250);
"Español uruguayo"

native_name = ToUnicode("Paraguayan Espagnnol", CHARSET_WIN1250);
"Español paraguayo"

native_name = ToUnicode("Bolivian Espagnnol", CHARSET_WIN1250);
"Español boliviano"

native_name = ToUnicode("Salvadorean Espagnnol", CHARSET_WIN1250);
"Español salvadoreño"

native_name = ToUnicode("Honduranian Espagnnol", CHARSET_WIN1250);
"Español hondureño"

native_name = ToUnicode("Nicaraguan Espagnnol", CHARSET_WIN1250);				
"Español nicaragüense"

native_name = ToUnicode("Puerto Rican Espagnnol", CHARSET_WIN1250);				
"Español puertorriqueño"

class LanguageInfoEU : public LanguageInfo
{
public:
	LanguageInfoEU()
		: LanguageInfo(LNG_('E', 'U'))
	{
		english_name = "Basque";
		native_name = ToUnicode("Euskara", CHARSET_DEFAULT);
	}
};



Best regards
Iñaki
Re: more complete lang.cpp [message #23667 is a reply to message #23662] Wed, 11 November 2009 21:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Wed, 11 November 2009 11:15

bonami wrote on Wed, 11 November 2009 09:40

i've added half languages' own classes. though many native names are still in english, i think it helps.
if this is right, i'll go on to add all of them.


Hello Bonami

I enclose you here some fixes for native names and I have added Basque language.

For example:
Original
native_name = ToUnicode("Espagnnol", CHARSET_WIN1250);

Fixed text
"Español"

Best regards
Koldo

english_name = "French";	native_name = "\x46\x72\x61\x6E\xC3\xA7\x61\x69\x73";		
"Français"
	
native_name = ToUnicode("Belge Francais", CHARSET_DEFAULT);
"Français de Belgique"

native_name = ToUnicode("Canadian Francais", CHARSET_DEFAULT);
"Français Canadien"

native_name = ToUnicode("Swiss Francais", CHARSET_DEFAULT);
"Français Suisse"

native_name = ToUnicode("Luxemburgisch Francais", CHARSET_DEFAULT);
"Français Luxembourgeois"

native_name = ToUnicode("Swiss Italiano", CHARSET_DEFAULT);
"Svizzera italiana"

native_name = ToUnicode("Espagnnol", CHARSET_WIN1250);
"Español"

native_name = ToUnicode("Mexican Espagnnol", CHARSET_WIN1250);
"Español mexicano"

native_name = ToUnicode("Guatemalan Espagnnol", CHARSET_WIN1250);
"Español guatemalteco"

native_name = ToUnicode("Costa Rican Espagnnol", CHARSET_WIN1250);
"Español costarricense"

native_name = ToUnicode("Panamanian Espagnnol", CHARSET_WIN1250);
"Español panameño"

native_name = ToUnicode("Dominican Espagnnol", CHARSET_WIN1250);
"Español dominicano"

native_name = ToUnicode("Venezuelan Espagnnol", CHARSET_WIN1250);
"Español venezolano"

native_name = ToUnicode("Colombian Espagnnol", CHARSET_WIN1250);
"Español colombiano"

native_name = ToUnicode("Peruvian Espagnnol", CHARSET_WIN1250);
"Español peruano"

native_name = ToUnicode("Argentinian Espagnnol", CHARSET_WIN1250);
"Español argentino"

native_name = ToUnicode("Ecuadorian Espagnnol", CHARSET_WIN1250);
"Español ecuatoriano"

native_name = ToUnicode("Chilian Espagnnol", CHARSET_WIN1250);
"Español chileno"

native_name = ToUnicode("Uruguayan Espagnnol", CHARSET_WIN1250);
"Español uruguayo"

native_name = ToUnicode("Paraguayan Espagnnol", CHARSET_WIN1250);
"Español paraguayo"

native_name = ToUnicode("Bolivian Espagnnol", CHARSET_WIN1250);
"Español boliviano"

native_name = ToUnicode("Salvadorean Espagnnol", CHARSET_WIN1250);
"Español salvadoreño"

native_name = ToUnicode("Honduranian Espagnnol", CHARSET_WIN1250);
"Español hondureño"

native_name = ToUnicode("Nicaraguan Espagnnol", CHARSET_WIN1250);				
"Español nicaragüense"

native_name = ToUnicode("Puerto Rican Espagnnol", CHARSET_WIN1250);				
"Español puertorriqueño"

class LanguageInfoEU : public LanguageInfo
{
public:
	LanguageInfoEU()
		: LanguageInfo(LNG_('E', 'U'))
	{
		english_name = "Basque";
		native_name = ToUnicode("Euskara", CHARSET_DEFAULT);
	}
};




Looking forward to combined post... Smile

Mirek
Re: more complete lang.cpp [message #23668 is a reply to message #23667] Wed, 11 November 2009 21:55 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Mirek

If it is ok for you and Bonami I can update it for you.

Best regards
Koldo


Best regards
Iñaki
Re: more complete lang.cpp [message #23669 is a reply to message #23668] Wed, 11 November 2009 22:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Actually, I was thinking about LanguageInfo a lot in the past.

I believe that MOST of informations provided by LanguageInfo could be presented using standard text translations, I mean those t_ - the little info you add here is shining example... Smile

The one exception, however, is sorting, that perhaps requires specialised routine for at least some languages.

Also worth investigating is the possibility of extracting the required info from host OS, maybe only for languages that do not have the info specified yet.

Frankly, LanguageInfo is one of classes I am not satisfied with....
Re: more complete lang.cpp [message #23671 is a reply to message #23668] Thu, 12 November 2009 04:24 Go to previous messageGo to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
koldo,
U can see i put hex codes for french since i don't know whether it's safe to type it in french in an ASCII file. basically those characters cannot be displayed in text editors on my machine. so i don't know it's a good idea to use your fixes for french like that.
i provided the file for everybody to complete. you are welcomed to do that.
Re: more complete lang.cpp [message #23673 is a reply to message #23671] Thu, 12 November 2009 08:59 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Bonami

Here I enclose your file with native names fixed.

For the languages I know I prefer to put it in text instead of in hex as it is easier to see if there are mistakes. For example in the older version it appeared "Francais" instead of the right "Français". As I can see it now I am sure that it is right Smile.

Best regards
Koldo
  • Attachment: Lang.cpp
    (Size: 40.71KB, Downloaded 364 times)


Best regards
Iñaki
Re: more complete lang.cpp [message #23677 is a reply to message #23673] Thu, 12 November 2009 19:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Thu, 12 November 2009 02:59

Hello Bonami

Here I enclose your file with native names fixed.

For the languages I know I prefer to put it in text instead of in hex as it is easier to see if there are mistakes. For example in the older version it appeared "Francais" instead of the right "Français". As I can see it now I am sure that it is right Smile.

Best regards
Koldo


Well, see my above post: Putting these constants as translation texts would solve the problem completely (at least, if I will be able to create .t editor soon to workaround that stupid CJK windows MSC compiler problem..)
Re: more complete lang.cpp [message #23680 is a reply to message #23677] Fri, 13 November 2009 02:46 Go to previous messageGo to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
Mirek,
I'm afraid I do not get it.
I'm getting all language list and enumerating their names, encountering troubles detailed http://www.ultimatepp.org/forum/index.php?t=msg&th=4740& amp;start=0&
So should we stop translating these language names?
Re: more complete lang.cpp [message #23681 is a reply to message #23677] Fri, 13 November 2009 03:21 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
luzr wrote on Thu, 12 November 2009 19:32


Well, see my above post: Putting these constants as translation texts would solve the problem completely (at least, if I will be able to create .t editor soon to workaround that stupid CJK windows MSC compiler problem..)

I very happy for listen to this message.
Re: more complete lang.cpp [message #23686 is a reply to message #23680] Fri, 13 November 2009 18:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
bonami wrote on Thu, 12 November 2009 20:46

Mirek,
I'm afraid I do not get it.
I'm getting all language list and enumerating their names, encountering troubles detailed http://www.ultimatepp.org/forum/index.php?t=msg&th=4740& amp; amp;start=0&
So should we stop translating these language names?


Instead of creating dozens of classes that only assign language names in constructor

	LanguageInfoEZ()
		: LanguageInfo(LNG_('E', 'N', 'N', 'Z'))
	{
		english_name = "New Zealand English";
		native_name = ToUnicode("New Zealand English", CHARSET_DEFAULT);
	}



we should have one generic class that does something like

	LanguageInfo()
	{
		english_name = t_("English");
....
	}


possibly also picking more info about the language from .t files first, from system later.
Re: more complete lang.cpp [message #23687 is a reply to message #23686] Fri, 13 November 2009 19:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, I am investigating the issue and I guess we should define what we really need LanguageInfo for... Smile

In my honest opinion, the only part is localised string comparison. Everything else can be implemented as t_ texts and in fact, in some circumstances it is doubled as such (e.g. names of days or months...).

What do YOU need from LanguageInfo, Bonami?

Mirek
Re: more complete lang.cpp [message #23746 is a reply to message #23687] Thu, 19 November 2009 08:22 Go to previous messageGo to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
i need to list all languages' names in their own language, so that a user can recognize it and select it and my program will be shown in that language. so onlay current native_name.
Re: more complete lang.cpp [message #23747 is a reply to message #23746] Thu, 19 November 2009 09:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, thanks. Will improve soon...
Re: more complete lang.cpp [message #23853 is a reply to message #23747] Fri, 27 November 2009 08:23 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Mirek

While trying to improve language support it would be good if you could change lang.cpp.

Best regards
Koldo


Best regards
Iñaki
Re: more complete lang.cpp [message #23868 is a reply to message #23853] Sun, 29 November 2009 22:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Fri, 27 November 2009 02:23

Hello Mirek

While trying to improve language support it would be good if you could change lang.cpp.

Best regards
Koldo


? Change to what?

Mirek
Re: more complete lang.cpp [message #23876 is a reply to message #23673] Mon, 30 November 2009 08:23 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Quote:

koldo wrote on Fri, 27 November 2009 02:23

Hello Mirek

While trying to improve language support it would be good if you could change lang.cpp.

Best regards
Koldo


? Change to what?

Mirek


To the file in this post:

koldo wrote on Thu, 12 November 2009 08:59

Hello Bonami

Here I enclose your file with native names fixed.

For the languages I know I prefer to put it in text instead of in hex as it is easier to see if there are mistakes. For example in the older version it appeared "Francais" instead of the right "Fran�ais". As I can see it now I am sure that it is right Smile.

Best regards
Koldo


There are new languages and important fixes over the original Lang.cpp. Perhaps the implementation is less than perfect, but it is what we have.

Best regards
Koldo

  • Attachment: Lang.cpp
    (Size: 40.71KB, Downloaded 297 times)


Best regards
Iñaki
Re: more complete lang.cpp [message #23882 is a reply to message #23876] Mon, 30 November 2009 11:57 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Mon, 30 November 2009 02:23

Quote:

koldo wrote on Fri, 27 November 2009 02:23

Hello Mirek

While trying to improve language support it would be good if you could change lang.cpp.

Best regards
Koldo


? Change to what?

Mirek


To the file in this post:

koldo wrote on Thu, 12 November 2009 08:59

Hello Bonami

Here I enclose your file with native names fixed.

For the languages I know I prefer to put it in text instead of in hex as it is easier to see if there are mistakes. For example in the older version it appeared "Francais" instead of the right "Fran�ais". As I can see it now I am sure that it is right Smile.

Best regards
Koldo


There are new languages and important fixes over the original Lang.cpp. Perhaps the implementation is less than perfect, but it is what we have.

Best regards
Koldo




Ah, I see. Of course, that it the part of refactoring, but I will likely take a little bit different route. Soon...

Mirek
Re: more complete lang.cpp [message #23978 is a reply to message #23882] Mon, 14 December 2009 00:11 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, LanguageInfo is now refactored, this problem is solved.

Mirek
Previous Topic: Can I do RUN-TIME localization files?...
Next Topic: same LNG_ in lang.cpp
Goto Forum:
  


Current Time: Fri Mar 29 03:28:15 CET 2024

Total time taken to generate the page: 0.01675 seconds