• An UDF to Get LanguageSettings of Office's Application


    Use  Application.LanguageSettings.LanguageID to to get LanguageSettings of Office's Application

    The codes:

    1. Sub ShowLanguage()
    2.     Dim Lan(-100 To 25000) As String
    3.     Init Lan
    4.    Debug.Print "Install Language        " & vbTab & Lan(Application.LanguageSettings.LanguageID(msoLanguageIDInstall)) & vbCrLf & _
    5.            "User Interface Language   " & vbTab & Lan(Application.LanguageSettings.LanguageID(msoLanguageIDUI)) & vbCrLf & _
    6.            "Help Language             " & vbTab & Lan(Application.LanguageSettings.LanguageID(msoLanguageIDHelp))
    7. End Sub
    8. Sub Init(ByRef Lan() As String)
    9.     Lan(msoLanguageIDAfrikaans) = "Afrikaans"
    10.     Lan(msoLanguageIDAlbanian) = "Albanian"
    11.     Lan(msoLanguageIDAmharic) = "Amharic"
    12.     Lan(msoLanguageIDArabic) = "Arabic"
    13.     Lan(msoLanguageIDArabicAlgeria) = "ArabicAlgeria"
    14.     Lan(msoLanguageIDArabicBahrain) = "ArabicBahrain"
    15.     Lan(msoLanguageIDArabicEgypt) = "ArabicEgypt"
    16.     Lan(msoLanguageIDArabicIraq) = "ArabicIraq"
    17.     Lan(msoLanguageIDArabicJordan) = "ArabicJordan"
    18.     Lan(msoLanguageIDArabicKuwait) = "ArabicKuwait"
    19.     Lan(msoLanguageIDArabicLebanon) = "ArabicLebanon"
    20.     Lan(msoLanguageIDArabicLibya) = "ArabicLibya"
    21.     Lan(msoLanguageIDArabicMorocco) = "ArabicMorocco"
    22.     Lan(msoLanguageIDArabicOman) = "ArabicOman"
    23.     Lan(msoLanguageIDArabicQatar) = "ArabicQatar"
    24.     Lan(msoLanguageIDArabicSyria) = "ArabicSyria"
    25.     Lan(msoLanguageIDArabicTunisia) = "ArabicTunisia"
    26.     Lan(msoLanguageIDArabicUAE) = "ArabicUAE"
    27.     Lan(msoLanguageIDArabicYemen) = "ArabicYemen"
    28.     Lan(msoLanguageIDArmenian) = "Armenian"
    29.     Lan(msoLanguageIDAssamese) = "Assamese"
    30.     Lan(msoLanguageIDAzeriCyrillic) = "AzeriCyrillic"
    31.     Lan(msoLanguageIDAzeriLatin) = "AzeriLatin"
    32.     Lan(msoLanguageIDBasque) = "Basque"
    33.     Lan(msoLanguageIDBelgianDutch) = "BelgianDutch"
    34.     Lan(msoLanguageIDBelgianFrench) = "BelgianFrench"
    35.     Lan(msoLanguageIDBengali) = "Bengali"
    36.     Lan(msoLanguageIDBrazilianPortuguese) = "BrazilianPortuguese"
    37.     Lan(msoLanguageIDBulgarian) = "Bulgarian"
    38.     Lan(msoLanguageIDBurmese) = "Burmese"
    39.     Lan(msoLanguageIDByelorussian) = "Byelorussian"
    40.     Lan(msoLanguageIDCatalan) = "Catalan"
    41.     Lan(msoLanguageIDCherokee) = "Cherokee"
    42.     Lan(msoLanguageIDChineseHongKong) = "ChineseHongKong"
    43.     Lan(msoLanguageIDChineseMacao) = "ChineseMacao"
    44.     Lan(msoLanguageIDChineseSingapore) = "ChineseSingapore"
    45.     Lan(msoLanguageIDCroatian) = "Croatian"
    46.     Lan(msoLanguageIDCzech) = "Czech"
    47.     Lan(msoLanguageIDDanish) = "Danish"
    48.     Lan(msoLanguageIDDutch) = "Dutch"
    49.     Lan(msoLanguageIDEnglishAUS) = "EnglishAUS"
    50.     Lan(msoLanguageIDEnglishBelize) = "EnglishBelize"
    51.     Lan(msoLanguageIDEnglishCanadian) = "EnglishCanadian"
    52.     Lan(msoLanguageIDEnglishCaribbean) = "EnglishCaribbean"
    53.     Lan(msoLanguageIDEnglishIreland) = "EnglishIreland"
    54.     Lan(msoLanguageIDEnglishJamaica) = "EnglishJamaica"
    55.     Lan(msoLanguageIDEnglishNewZealand) = "EnglishNewZealand"
    56.     Lan(msoLanguageIDEnglishPhilippines) = "EnglishPhilippines"
    57.     Lan(msoLanguageIDEnglishSouthAfrica) = "EnglishSouthAfrica"
    58.     Lan(msoLanguageIDEnglishTrinidad) = "EnglishTrinidad"
    59.     Lan(msoLanguageIDEnglishUK) = "EnglishUK"
    60.     Lan(msoLanguageIDEnglishUS) = "EnglishUS"
    61.     Lan(msoLanguageIDEnglishZimbabwe) = "EnglishZimbabwe"
    62.     Lan(msoLanguageIDEstonian) = "Estonian"
    63.     Lan(msoLanguageIDFaeroese) = "Faeroese"
    64.     Lan(msoLanguageIDFarsi) = "Farsi"
    65.     Lan(msoLanguageIDFinnish) = "Finnish"
    66.     Lan(msoLanguageIDFrench) = "French"
    67.     Lan(msoLanguageIDFrenchCameroon) = "FrenchCameroon"
    68.     Lan(msoLanguageIDFrenchCanadian) = "FrenchCanadian"
    69.     Lan(msoLanguageIDFrenchCotedIvoire) = "FrenchCotedIvoire"
    70.     Lan(msoLanguageIDFrenchLuxembourg) = "FrenchLuxembourg"
    71.     Lan(msoLanguageIDFrenchMali) = "FrenchMali"
    72.     Lan(msoLanguageIDFrenchMonaco) = "FrenchMonaco"
    73.     Lan(msoLanguageIDFrenchReunion) = "FrenchReunion"
    74.     Lan(msoLanguageIDFrenchSenegal) = "FrenchSenegal"
    75.     Lan(msoLanguageIDFrenchWestIndies) = "FrenchWestIndies"
    76.     Lan(msoLanguageIDFrenchZaire) = "FrenchZaire"
    77.     Lan(msoLanguageIDFrisianNetherlands) = "FrisianNetherlands"
    78.     Lan(msoLanguageIDGaelicIreland) = "GaelicIreland"
    79.     Lan(msoLanguageIDGaelicScotland) = "GaelicScotland"
    80.     Lan(msoLanguageIDGalician) = "Galician"
    81.     Lan(msoLanguageIDGeorgian) = "Georgian"
    82.     Lan(msoLanguageIDGerman) = "German"
    83.     Lan(msoLanguageIDGermanAustria) = "GermanAustria"
    84.     Lan(msoLanguageIDGermanLiechtenstein) = "GermanLiechtenstein"
    85.     Lan(msoLanguageIDGermanLuxembourg) = "GermanLuxembourg"
    86.     Lan(msoLanguageIDGreek) = "Greek"
    87.     Lan(msoLanguageIDGujarati) = "Gujarati"
    88.     Lan(msoLanguageIDHebrew) = "Hebrew"
    89.     Lan(msoLanguageIDHindi) = "Hindi"
    90.     Lan(msoLanguageIDHungarian) = "Hungarian"
    91.     Lan(msoLanguageIDIcelandic) = "Icelandic"
    92.     Lan(msoLanguageIDIndonesian) = "Indonesian"
    93.     Lan(msoLanguageIDInuktitut) = "Inuktitut"
    94.     Lan(msoLanguageIDItalian) = "Italian"
    95.     Lan(msoLanguageIDJapanese) = "Japanese"
    96.     Lan(msoLanguageIDKannada) = "Kannada"
    97.     Lan(msoLanguageIDKashmiri) = "Kashmiri"
    98.     Lan(msoLanguageIDKazakh) = "Kazakh"
    99.     Lan(msoLanguageIDKhmer) = "Khmer"
    100.     Lan(msoLanguageIDKirghiz) = "Kirghiz"
    101.     Lan(msoLanguageIDKonkani) = "Konkani"
    102.     Lan(msoLanguageIDKorean) = "Korean"
    103.     Lan(msoLanguageIDLao) = "Lao"
    104.     Lan(msoLanguageIDLatvian) = "Latvian"
    105.     Lan(msoLanguageIDLithuanian) = "Lithuanian"
    106.     Lan(msoLanguageIDMacedonian) = "Macedonian"
    107.     Lan(msoLanguageIDMalayalam) = "Malayalam"
    108.     Lan(msoLanguageIDMalayBruneiDarussalam) = "MalayBruneiDarussalam"
    109.     Lan(msoLanguageIDMalaysian) = "Malaysian"
    110.     Lan(msoLanguageIDMaltese) = "Maltese"
    111.     Lan(msoLanguageIDManipuri) = "Manipuri"
    112.     Lan(msoLanguageIDMarathi) = "Marathi"
    113.     Lan(msoLanguageIDMexicanSpanish) = "MexicanSpanish"
    114.     Lan(msoLanguageIDMixed) = "Mixed"
    115.     Lan(msoLanguageIDMongolian) = "Mongolian"
    116.     Lan(msoLanguageIDNepali) = "Nepali"
    117.     Lan(msoLanguageIDNone) = "None"
    118.     Lan(msoLanguageIDNoProofing) = "NoProofing"
    119.     Lan(msoLanguageIDNorwegianBokmol) = "NorwegianBokmol"
    120.     Lan(msoLanguageIDNorwegianNynorsk) = "NorwegianNynorsk"
    121.     Lan(msoLanguageIDOriya) = "Oriya"
    122.     Lan(msoLanguageIDOromo) = "Oromo"
    123.     Lan(msoLanguageIDPolish) = "Polish"
    124.     Lan(msoLanguageIDPortuguese) = "Portuguese"
    125.     Lan(msoLanguageIDPunjabi) = "Punjabi"
    126.     Lan(msoLanguageIDRhaetoRomanic) = "RhaetoRomanic"
    127.     Lan(msoLanguageIDRomanian) = "Romanian"
    128.     Lan(msoLanguageIDRomanianMoldova) = "RomanianMoldova"
    129.     Lan(msoLanguageIDRussian) = "Russian"
    130.     Lan(msoLanguageIDRussianMoldova) = "RussianMoldova"
    131.     Lan(msoLanguageIDSamiLappish) = "SamiLappish"
    132.     Lan(msoLanguageIDSanskrit) = "Sanskrit"
    133.     Lan(msoLanguageIDSerbianCyrillic) = "SerbianCyrillic"
    134.     Lan(msoLanguageIDSerbianLatin) = "SerbianLatin"
    135.     Lan(msoLanguageIDSesotho) = "Sesotho"
    136.     Lan(msoLanguageIDSimplifiedChinese) = "SimplifiedChinese"
    137.     Lan(msoLanguageIDSindhi) = "Sindhi"
    138.     Lan(msoLanguageIDSlovak) = "Slovak"
    139.     Lan(msoLanguageIDSlovenian) = "Slovenian"
    140.     Lan(msoLanguageIDSorbian) = "Sorbian"
    141.     Lan(msoLanguageIDSpanish) = "Spanish"
    142.     Lan(msoLanguageIDSpanishArgentina) = "SpanishArgentina"
    143.     Lan(msoLanguageIDSpanishBolivia) = "SpanishBolivia"
    144.     Lan(msoLanguageIDSpanishChile) = "SpanishChile"
    145.     Lan(msoLanguageIDSpanishColombia) = "SpanishColombia"
    146.     Lan(msoLanguageIDSpanishCostaRica) = "SpanishCostaRica"
    147.     Lan(msoLanguageIDSpanishDominicanRepublic) = "SpanishDominicanRepublic"
    148.     Lan(msoLanguageIDSpanishEcuador) = "SpanishEcuador"
    149.     Lan(msoLanguageIDSpanishElSalvador) = "SpanishElSalvador"
    150.     Lan(msoLanguageIDSpanishGuatemala) = "SpanishGuatemala"
    151.     Lan(msoLanguageIDSpanishHonduras) = "SpanishHonduras"
    152.     Lan(msoLanguageIDSpanishModernSort) = "SpanishModernSort"
    153.     Lan(msoLanguageIDSpanishNicaragua) = "SpanishNicaragua"
    154.     Lan(msoLanguageIDSpanishPanama) = "SpanishPanama"
    155.     Lan(msoLanguageIDSpanishParaguay) = "SpanishParaguay"
    156.     Lan(msoLanguageIDSpanishPeru) = "SpanishPeru"
    157.     Lan(msoLanguageIDSpanishPuertoRico) = "SpanishPuertoRico"
    158.     Lan(msoLanguageIDSpanishUruguay) = "SpanishUruguay"
    159.     Lan(msoLanguageIDSpanishVenezuela) = "SpanishVenezuela"
    160.     Lan(msoLanguageIDSutu) = "Sutu"
    161.     Lan(msoLanguageIDSwahili) = "Swahili"
    162.     Lan(msoLanguageIDSwedish) = "Swedish"
    163.     Lan(msoLanguageIDSwedishFinland) = "SwedishFinland"
    164.     Lan(msoLanguageIDSwissFrench) = "SwissFrench"
    165.     Lan(msoLanguageIDSwissGerman) = "SwissGerman"
    166.     Lan(msoLanguageIDSwissItalian) = "SwissItalian"
    167.     Lan(msoLanguageIDTajik) = "Tajik"
    168.     Lan(msoLanguageIDTamil) = "Tamil"
    169.     Lan(msoLanguageIDTatar) = "Tatar"
    170.     Lan(msoLanguageIDTelugu) = "Telugu"
    171.     Lan(msoLanguageIDThai) = "Thai"
    172.     Lan(msoLanguageIDTibetan) = "Tibetan"
    173.     Lan(msoLanguageIDTigrignaEritrea) = "TigrignaEritrea"
    174.     Lan(msoLanguageIDTigrignaEthiopic) = "TigrignaEthiopic"
    175.     Lan(msoLanguageIDTraditionalChinese) = "TraditionalChinese"
    176.     Lan(msoLanguageIDTsonga) = "Tsonga"
    177.     Lan(msoLanguageIDTswana) = "Tswana"
    178.     Lan(msoLanguageIDTurkish) = "Turkish"
    179.     Lan(msoLanguageIDTurkmen) = "Turkmen"
    180.     Lan(msoLanguageIDUkrainian) = "Ukrainian"
    181.     Lan(msoLanguageIDUrdu) = "Urdu"
    182.     Lan(msoLanguageIDUzbekCyrillic) = "UzbekCyrillic"
    183.     Lan(msoLanguageIDUzbekLatin) = "UzbekLatin"
    184.     Lan(msoLanguageIDVenda) = "Venda"
    185.     Lan(msoLanguageIDVietnamese) = "Vietnamese"
    186.     Lan(msoLanguageIDWelsh) = "Welsh"
    187.     Lan(msoLanguageIDXhosa) = "Xhosa"
    188.     Lan(msoLanguageIDZulu) = "Zulu"
    189. End Sub

     

     
    It reurns :

    Install Language                  EnglishUS
    User Interface Language     EnglishUS
    Help Language                    EnglishUS

  • 相关阅读:
    VS2019项目打开遇到的问题
    访问修饰符
    缩写
    PHP invoke函数使用
    json中有中文
    Walmart SKU空格问题
    error和exception的
    phpunit的安装
    curl注意
    关于学习
  • 原文地址:https://www.cnblogs.com/fengju/p/6336235.html
Copyright © 2020-2023  润新知