Which language version of Excel is installed

Which language version of Excel is installed

Postby betoncu » Thu Mar 29, 2007 3:06 am

Hi,

Is it possible to find out which language version of Excel is installed on the current system.
i.e whether it is japanese office, english office, chinese office or some other language.

How can i find it out using the code ?

Regards,
Birol Betoncu
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Postby Jeff Barnes » Thu Mar 29, 2007 10:55 pm

This is the info found in the excel chm file:

LanguageSettings Property Example

This example returns the language identifier for the language you selected when you installed Microsoft Excel.

Set objLangSet = Application.LanguageSettings
MsgBox objLangSet.LanguageID(msoLanguageIDInstall)


I Hope this helps.


Jeff
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Postby Jeff Barnes » Thu Mar 29, 2007 11:23 pm

After further searching.....

Code: Select all  Expand view
oExcel := TOleAuto():New( "Excel.Application" )
nCode := oExcel:LanguageSettings:LanguageID(3)


Where nCode can be found in the following chart.

Jeff.



msoLanguageIDAfrikaans 1078
msoLanguageIDAlbanian 1052
msoLanguageIDAmharic 1118
msoLanguageIDArabic 1025
msoLanguageIDArabicAlgeria 5121
msoLanguageIDArabicBahrain 15361
msoLanguageIDArabicEgypt 3073
msoLanguageIDArabicIraq 2049
msoLanguageIDArabicJordan 11265
msoLanguageIDArabicKuwait 13313
msoLanguageIDArabicLebanon 12289
msoLanguageIDArabicLibya 4097
msoLanguageIDArabicMorocco 6145
msoLanguageIDArabicOman 8193
msoLanguageIDArabicQatar 16385
msoLanguageIDArabicSyria 10241
msoLanguageIDArabicTunisia 7169
msoLanguageIDArabicUAE 14337
msoLanguageIDArabicYemen 9217
msoLanguageIDArmenian 1067
msoLanguageIDAssamese 1101
msoLanguageIDAzeriCyrillic 2092
msoLanguageIDAzeriLatin 1068
msoLanguageIDBasque 1069
msoLanguageIDBelgianDutch 2067
msoLanguageIDBelgianFrench 2060
msoLanguageIDBengali 1093
msoLanguageIDBosnian 4122
msoLanguageIDBrazilianPortuguese 1046
msoLanguageIDBulgarian 1026
msoLanguageIDBurmese 1109
msoLanguageIDByelorussian 1059
msoLanguageIDCatalan 1027
msoLanguageIDCherokee 1116
msoLanguageIDChineseHongKongSAR 3076
msoLanguageIDChineseMacaoSAR 5124
msoLanguageIDChineseSingapore 4100
msoLanguageIDCroatian 1050
msoLanguageIDCzech 1029
msoLanguageIDDanish 1030
msoLanguageIDDivehi 1125
msoLanguageIDDutch 1043
msoLanguageIDDzongkhaBhutan 2129
msoLanguageIDEdo 1126
msoLanguageIDEnglishAUS 3081
msoLanguageIDEnglishBelize 10249
msoLanguageIDEnglishCanadian 4105
msoLanguageIDEnglishCaribbean 9225
msoLanguageIDEnglishIndonesia 14345
msoLanguageIDEnglishIreland 6153
msoLanguageIDEnglishJamaica 8201
msoLanguageIDEnglishNewZealand 5129
msoLanguageIDEnglishPhilippines 13321
msoLanguageIDEnglishSouthAfrica 7177
msoLanguageIDEnglishTrinidadTobago 11273
msoLanguageIDEnglishUK 2057
msoLanguageIDEnglishUS 1033
msoLanguageIDEnglishZimbabwe 12297
msoLanguageIDEstonian 1061
msoLanguageIDFaeroese 1080
msoLanguageIDFarsi 1065
msoLanguageIDFilipino 1124
msoLanguageIDFinnish 1035
msoLanguageIDFrench 1036
msoLanguageIDFrenchCameroon 11276
msoLanguageIDFrenchCanadian 3084
msoLanguageIDFrenchCotedIvoire 12300
msoLanguageIDFrenchHaiti 15372
msoLanguageIDFrenchLuxembourg 5132
msoLanguageIDFrenchMali 13324
msoLanguageIDFrenchMonaco 6156
msoLanguageIDFrenchMorocco 14348
msoLanguageIDFrenchReunion 8204
msoLanguageIDFrenchSenegal 10252
msoLanguageIDFrenchWestIndies 7180
msoLanguageIDFrenchZaire 9228
msoLanguageIDFrisianNetherlands 1122
msoLanguageIDFulfulde 1127
msoLanguageIDGaelicIreland 2108
msoLanguageIDGaelicScotland 1084
msoLanguageIDGalician 1110
msoLanguageIDGeorgian 1079
msoLanguageIDGerman 1031
msoLanguageIDGermanAustria 3079
msoLanguageIDGermanLiechtenstein 5127
msoLanguageIDGermanLuxembourg 4103
msoLanguageIDGreek 1032
msoLanguageIDGuarani 1140
msoLanguageIDGujarati 1095
msoLanguageIDHausa 1128
msoLanguageIDHawaiian 1141
msoLanguageIDHebrew 1037
msoLanguageIDHindi 1081
msoLanguageIDHungarian 1038
msoLanguageIDIbibio 1129
msoLanguageIDIcelandic 1039
msoLanguageIDIgbo 1136
msoLanguageIDIndonesian 1057
msoLanguageIDInuktitut 1117
msoLanguageIDItalian 1040
msoLanguageIDJapanese 1041
msoLanguageIDKannada 1099
msoLanguageIDKanuri 1137
msoLanguageIDKashmiri 1120
msoLanguageIDKashmiriDevanagari 2144
msoLanguageIDKazakh 1087
msoLanguageIDKhmer 1107
msoLanguageIDKirghiz 1088
msoLanguageIDKonkani 1111
msoLanguageIDKorean 1042
msoLanguageIDKyrgyz 1088
msoLanguageIDLao 1108
msoLanguageIDLatin 1142
msoLanguageIDLatvian 1062
msoLanguageIDLithuanian 1063
msoLanguageIDMacedonian 1071
msoLanguageIDMalayalam 1100
msoLanguageIDMalayBruneiDarussalam 2110
msoLanguageIDMalaysian 1086
msoLanguageIDMaltese 1082
msoLanguageIDManipuri 1112
msoLanguageIDMaori 1153
msoLanguageIDMarathi 1102
msoLanguageIDMexicanSpanish 2058
msoLanguageIDMixed -2
msoLanguageIDMongolian 1104
msoLanguageIDNepali 1121
msoLanguageIDNone 0
msoLanguageIDNoProofing 1024
msoLanguageIDNorwegianBokmol 1044
msoLanguageIDNorwegianNynorsk 2068
msoLanguageIDOriya 1096
msoLanguageIDOromo 1138
msoLanguageIDPashto 1123
msoLanguageIDPolish 1045
msoLanguageIDPortuguese 2070
msoLanguageIDPunjabi 1094
msoLanguageIDQuechuaBolivia 1131
msoLanguageIDQuechuaEcuador 2155
msoLanguageIDQuechuaPeru 3179
msoLanguageIDRhaetoRomanic 1047
msoLanguageIDRomanian 1048
msoLanguageIDRomanianMoldova 2072
msoLanguageIDRussian 1049
msoLanguageIDRussianMoldova 2073
msoLanguageIDSamiLappish 1083
msoLanguageIDSanskrit 1103
msoLanguageIDSepedi 1132
msoLanguageIDSerbianCyrillic 3098
msoLanguageIDSerbianLatin 2074
msoLanguageIDSesotho 1072
msoLanguageIDSimplifiedChinese 2052
msoLanguageIDSindhi 1113
msoLanguageIDSindhiPakistan 2137
msoLanguageIDSinhalese 1115
msoLanguageIDSlovak 1051
msoLanguageIDSlovenian 1060
msoLanguageIDSomali 1143
msoLanguageIDSorbian 1070
msoLanguageIDSpanish 1034
msoLanguageIDSpanishArgentina 11274
msoLanguageIDSpanishBolivia 16394
msoLanguageIDSpanishChile 13322
msoLanguageIDSpanishColombia 9226
msoLanguageIDSpanishCostaRica 5130
msoLanguageIDSpanishDominicanRepublic 7178
msoLanguageIDSpanishEcuador 12298
msoLanguageIDSpanishElSalvador 17418
msoLanguageIDSpanishGuatemala 4106
msoLanguageIDSpanishHonduras 18442
msoLanguageIDSpanishModernSort 3082
msoLanguageIDSpanishNicaragua 19466
msoLanguageIDSpanishPanama 6154
msoLanguageIDSpanishParaguay 15370
msoLanguageIDSpanishPeru 10250
msoLanguageIDSpanishPuertoRico 20490
msoLanguageIDSpanishUruguay 14346
msoLanguageIDSpanishVenezuela 8202
msoLanguageIDSutu 1072
msoLanguageIDSwahili 1089
msoLanguageIDSwedish 1053
msoLanguageIDSwedishFinland 2077
msoLanguageIDSwissFrench 4108
msoLanguageIDSwissGerman 2055
msoLanguageIDSwissItalian 2064
msoLanguageIDSyriac 1114
msoLanguageIDTajik 1064
msoLanguageIDTamazight 1119
msoLanguageIDTamazightLatin 2143
msoLanguageIDTamil 1097
msoLanguageIDTatar 1092
msoLanguageIDTelugu 1098
msoLanguageIDThai 1054
msoLanguageIDTibetan 1105
msoLanguageIDTigrignaEritrea 2163
msoLanguageIDTigrignaEthiopic 1139
msoLanguageIDTraditionalChinese 1028
msoLanguageIDTsonga 1073
msoLanguageIDTswana 1074
msoLanguageIDTurkish 1055
msoLanguageIDTurkmen 1090
msoLanguageIDUkrainian 1058
msoLanguageIDUrdu 1056
msoLanguageIDUzbekCyrillic 2115
msoLanguageIDUzbekLatin 1091
msoLanguageIDVenda 1075
msoLanguageIDVietnamese 1066
msoLanguageIDWelsh 1106
msoLanguageIDXhosa 1076
msoLanguageIDYi 1144
msoLanguageIDYiddish 1085
msoLanguageIDYoruba 1130
msoLanguageIDZulu 1077
[/list]
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Postby Enrico Maria Giordano » Fri Mar 30, 2007 9:09 am

Right! I just found this one in my old samples:

Code: Select all  Expand view
#define msoLanguageIDInstall 1
#define msoLanguageIDUI      2
#define msoLanguageIDHelp    3


FUNCTION MAIN()

    LOCAL oExcel := CREATEOBJECT( "Excel.Application" )

    LOCAL oApp := oExcel:CommandBars( "Standard" ):Application

    ? oApp:LanguageSettings:LanguageID( msoLanguageIDInstall )
    ? oApp:LanguageSettings:LanguageID( msoLanguageIDUI )
    ? oApp:LanguageSettings:LanguageID( msoLanguageIDHelp )

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby betoncu » Fri Mar 30, 2007 3:59 pm

jeff, Enrico
Thank you very much. I will try.

Birol Betoncu
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Postby betoncu » Fri Mar 30, 2007 4:15 pm

It works perfect,
Again thank you very much.

Birol Betoncu
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 58 guests