0 Replies Latest reply on Nov 11, 2010 7:46 AM by Andreas Jansson

    Mapping of InDesign languages to LCID (4 digit Locale Identifiers MS style)

    Andreas Jansson Level 2

      Here is a suggestion for a mapping table if you've got LCIDs and need to convert them to InDesign languages. I really hope that the identities of the languages in InDesign are faily permanent and the same for all languages (that is, can I be sure that Turkish is n:o 81 on a Swedish installation as well as on an English installation - and doesn't change between CS3, CS4 and CS5).

       

      In short: Is this a reliable way of working the problem out, would you say?

       

       

          var idLangToLcidMapping = new Object();
      
          idLangToLcidMapping[0]       =58  //Result: [No Language]
          idLangToLcidMapping[1033]    =59 //English: USA
          idLangToLcidMapping[1036]    =62 //French
          idLangToLcidMapping[1034]    =63 //Spanish 
          idLangToLcidMapping[1040]    =64 //Italian 
          idLangToLcidMapping[2057]    =65 //English: UK 
          idLangToLcidMapping[1053]    =66 //Swedish 
          idLangToLcidMapping[1030]    =67 //Danish 
          idLangToLcidMapping[1044]    =68 //Norwegian: Bokmål 
          idLangToLcidMapping[2070]    =69 //Portuguese 
          idLangToLcidMapping[1046]    =70 //Portuguese: Brazilian 
          idLangToLcidMapping[3084]    =71 //French: Canadian 
          idLangToLcidMapping[2068]    =72 //Norwegian: Nynorsk 
          idLangToLcidMapping[1035]    =73 //Finnish 
          idLangToLcidMapping[1027]    =74 //Catalan 
          idLangToLcidMapping[1049]    =75 //Russian 
          idLangToLcidMapping[1026]    =76 //Bulgarian 
          idLangToLcidMapping[1029]    =77 //Czech 
          idLangToLcidMapping[1045]    =78 //Polish 
          idLangToLcidMapping[1048]    =79 //Romanian 
          idLangToLcidMapping[1032]    =80 //Greek 
          idLangToLcidMapping[1055]    =81 //Turkish 
          idLangToLcidMapping[1038]    =82 //Hungarian 
          idLangToLcidMapping[4105]    =83 //English: Canadian 
          idLangToLcidMapping[1051]    =84 //Slovak 
          idLangToLcidMapping[1050]    =85 //Croatian 
          idLangToLcidMapping[1061]    =86 //Estonian 
          idLangToLcidMapping[1062]    =87 //Latvian 
          idLangToLcidMapping[1063]    =88 //Lithuanian 
          idLangToLcidMapping[1060]    =89 //Slovenian 
          idLangToLcidMapping[1031]    =92 //German: 2006 Reform 
          idLangToLcidMapping[1043]    =94 //Dutch: 2005 Reform 
          idLangToLcidMapping[2055]    =96 //German: Swiss 2006 Reform
          idLangToLcidMapping[1058]    =97 //Ukrainian
      
      /* Not mapped */
      //60        //English: USA Medical 
      //61        //English: USA Legal 
      //90        //German: Old Rules 
      //91        //German: 1996 Reform 
      //93        //Dutch: Old Rules 
      //95        //German: Swiss 
      
      var myIndesignLanguageReference = app.languagesWithVendors.itemByID(idLangToLcidMapping[1049]);
      
      alert (myIndesignLanguageReference.name);

       

      Message was edited by: Andreas Jansson