Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

LangConstants.au3


  • Please log in to reply
8 replies to this topic

#1 ludocus

ludocus

    Possibly inventive crap going on right here

  • Active Members
  • PipPipPipPipPipPip
  • 668 posts

Posted 27 May 2008 - 04:48 PM

I was always confused with those language codes,
So thats why I made LanguageConstants.au3.
here it is:
Attached File  LangConstants.au3   5.07KB   439 downloads

Enjoy
comments are welcome :)

Edited by ludocus, 27 May 2008 - 04:50 PM.








#2 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 27 May 2008 - 05:33 PM

I was always confused with those language codes,
So thats why I made LanguageConstants.au3.
here it is:
Attached File  LangConstants.au3   5.07KB   439 downloads

Enjoy
comments are welcome :)

Thanks for posting it.
This might come in handy when I get around to re-writing my language UDF. I think I have more languages than that in there though. No problem, if that's the case I can just add them in.
Understanding the language codes is easier if you realize that the language code is actually just the two characters on the right. The rest of the characters are used to determine the regional dialect. For example English will always end in 09 but there are 13 regional dialects which are determined by the 2 characters on the left of the string.
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#3 Jos

Jos

    ...

  • Developers
  • 23,273 posts

Posted 27 May 2008 - 07:37 PM

I think this is wrong because the languages codes shown in the include are the HEX values for the languages and you made the Values and strings.
I have a Func Language_Code($code) in AutoIt3Wrapper that translates the language DEC value to the language desciption which I use in the Resource update routines.

Jos

Edited by Jos, 28 May 2008 - 08:18 AM.

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#4 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 27 May 2008 - 07:51 PM

I think this is wrong because the languages codes shown in the include are the HEX values for the languages and you made the Values and strings.
I have a Func Language_Code($code) in AutoIt3Wrapper that translates the language name to the DEC value of the language whicg I use in the Resource update routines.

Jos

When I get to it (which means when I get up) I'm going to look at that one Jos. I thnk I've seen it but not sure. I may even incorporate it into the Language UDF and hopefully that will help clean up some of the other issues which have not changed since the last time you looked at it.
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#5 Jos

Jos

    ...

  • Developers
  • 23,273 posts

Posted 27 May 2008 - 07:53 PM

When I get to it (which means when I get up) I'm going to look at that one Jos. I thnk I've seen it but not sure. I may even incorporate it into the Language UDF and hopefully that will help clean up some of the other issues which have not changed since the last time you looked at it.

Here is it... and it takes the language code in DEC and returns the Language description. :)
Plain Text         
Func Language_Code($code)     Local $CountryTable = _             "Afrikaans,1078|" & _             "Albanian,1052|" & _             "Arabic (Algeria),5121|" & _             "Arabic (Bahrain),15361|" & _             "Arabic (Egypt),3073|" & _             "Arabic (Iraq),2049|" & _             "Arabic (Jordan),11265|" & _             "Arabic (Kuwait),13313|" & _             "Arabic (Lebanon),12289|" & _             "Arabic (Libya),4097|" & _             "Arabic (Morocco),6145|" & _             "Arabic (Oman),8193|" & _             "Arabic (Qatar),16385|" & _             "Arabic (Saudi Arabia),1025|" & _             "Arabic (Syria),10241|" & _             "Arabic (Tunisia),7169|" & _             "Arabic (U.A.E.),14337|" & _             "Arabic (Yemen),9217|" & _             "Basque,1069|" & _             "Belarusian,1059|" & _             "Bulgarian,1026|" & _             "Catalan,1027|" & _             "Chinese (Hong Kong SAR),3076|" & _             "Chinese (PRC),2052|" & _             "Chinese (Singapore),4100|" & _             "Chinese (Taiwan),1028|" & _             "Croatian,1050|" & _             "Czech,1029|" & _             "Danish,1030|" & _             "Dutch,1043|" & _             "Dutch (Belgium),2067|"     $CountryTable &= _             "English (Australia),3081|" & _             "English (Belize),10249|" & _             "English (Canada),4105|" & _             "English (Ireland),6153|" & _             "English (Jamaica),8201|" & _             "English (New Zealand),5129|" & _             "English (South Africa),7177|" & _             "English (Trinidad),11273|" & _             "English (United Kingdom),2057|" & _             "English (United States),1033|" & _             "Estonian,1061|" & _             "Faeroese,1080|" & _             "Farsi,1065|" & _             "Finnish,1035|" & _             "French (Standard),1036|" & _             "French (Belgium),2060|" & _             "French (Canada),3084|" & _             "French (Luxembourg),5132|" & _             "French (Switzerland),4108|" & _             "Gaelic (Scotland),1084|" & _             "German (Standard),1031|" & _             "German (Austrian),3079|" & _             "German (Liechtenstein),5127|" & _             "German (Luxembourg),4103|" & _             "German (Switzerland),2055|" & _             "Greek,1032|" & _             "Hebrew,1037|" & _             "Hindi,1081|" & _             "Hungarian,1038|"     $CountryTable &= _             "Icelandic,1039|" & _             "Indonesian,1057|" & _             "Italian (Standard),1040|" & _             "Italian (Switzerland),2064|" & _             "Japanese,1041|" & _             "Korean,1042|" & _             "Latvian,1062|" & _             "Lithuanian,1063|" & _             "Macedonian (FYROM),1071|" & _             "Malay (Malaysia),1086|" & _             "Maltese,1082|" & _             "Norwegian (BokmÃ¥l),1044|" & _             "Polish,1045|" & _             "Portuguese (Brazil),1046|" & _             "Portuguese (Portugal),2070|" & _             "Raeto (Romance),1047|" & _             "Romanian,1048|" & _             "Romanian (Moldova),2072|" & _             "Russian,1049|" & _             "Russian (Moldova),2073|" & _             "Serbian (Cyrillic),3098|" & _             "Setsuana,1074|" & _             "Slovak,1051|" & _             "Slovenian,1060|" & _             "Sorbian,1070|"     $CountryTable &= _             "Spanish (Argentina),11274|" & _             "Spanish (Bolivia),16394|" & _             "Spanish (Chile),13322|" & _             "Spanish (Columbia),9226|" & _             "Spanish (Costa Rica),5130|" & _             "Spanish (Dominican Republic),7178|" & _             "Spanish (Ecuador),12298|" & _             "Spanish (El Salvador),17418|" & _             "Spanish (Guatemala),4106|" & _             "Spanish (Honduras),18442|" & _             "Spanish (Mexico),2058|" & _             "Spanish (Nicaragua),19466|" & _             "Spanish (Panama),6154|" & _             "Spanish (Paraguay),15370|" & _             "Spanish (Peru),10250|" & _             "Spanish (Puerto Rico),20490|" & _             "Spanish (Spain),1034|" & _             "Spanish (Uruguay),14346|" & _             "Spanish (Venezuela),8202|" & _             "Sutu,1072|" & _             "Swedish,1053|" & _             "Swedish (Finland),2077|" & _             "Thai,1054|" & _             "Turkish,1055|" & _             "Tsonga,1073|" & _             "Ukranian,1058|" & _             "Urdu (Pakistan),1056|" & _             "Vietnamese,1066|" & _             "Xhosa,1076|" & _             "Yiddish,1085|" & _             "Zulu,1077|"     Local $Found = StringInStr($CountryTable, "," & $code & "|")     If $Found Then         $CountryTable = StringLeft($CountryTable, $Found - 1)         Return StringMid($CountryTable, StringInStr($CountryTable, "|", Default, -1) + 1)     Else         Return "Unknown Country code specified"     EndIf EndFunc  ;==>Language_Code

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#6 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 27 May 2008 - 08:55 PM

Thanks Jos. I just finished checking the wrappers thread and did not see it. We need to get @Val to update the first post I think.
I think he's starting to slack off again.

I'm also getting disturbed that the wrappers thread is not yet a sticky. However many people will say that I'm somewhat disturbed anyway.

I will definitly be adding this to the Language UDF.
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#7 Jos

Jos

    ...

  • Developers
  • 23,273 posts

Posted 27 May 2008 - 08:58 PM

Thanks Jos. I just finished checking the wrappers thread and did not see it. We need to get @Val to update the first post I think.
I think he's starting to slack off again.

I'm also getting disturbed that the wrappers thread is not yet a sticky. However many people will say that I'm somewhat disturbed anyway.

I will definitly be adding this to the Language UDF.

This isn't in the wrapper thread to my knowledge but comes from my AutoIt3Wrapper script that performs all tasks for the Running and Compiling scripts performing all stuff that is defined in the Directives.

Jos

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#8 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,573 posts

Posted 27 May 2008 - 09:01 PM

This isn't in the wrapper thread to my knowledge but comes from my AutoIt3Wrapper script that performs all tasks for the Running and Compiling scripts performing all stuff that is defined in the Directives.

Jos

Well no wonder I couldn't find it!!!
:)
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#9 ludocus

ludocus

    Possibly inventive crap going on right here

  • Active Members
  • PipPipPipPipPipPip
  • 668 posts

Posted 28 May 2008 - 05:35 AM

thnx jos :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users