Hi, If i am working in the office environment then the language of office can be different the language of windows. Now in IPM.Contact object in the office environment there's a way to set the Country Name for address of the contact. While automating on this object model i want to default the country of the newly created contact to the current country. Now as i understand i can get the 2/3 letter ISO code for the country from the RegionInfo class and if use the DisplayName property on this object then i get the current country as String in the current language of OS. However there's a possibility that the language of office is different then the language of OS and in this case i might be defaulring the country name to a wrong value (Since sam country name can be displayed as different strings in different languages) Is there a way to find the country name in the language of outlook or in other words any given language. Any help will be great on this topic.... Thanks, Abhishek
Hi Abhishek. To summarize, you want to get the current region based on the user locale, but the display name based on the Office UI language? Unfortunately, I don't know of any way to consistently manage that via the RegionInfo class. The missing piece is the Office language translation of the region name. While the .NET Framework includes English and native names for all supported regions, only a corresponding language pack includes the local-market translations for non-native region names. Cheers, Garrett McGowan [MSFT Developer International] This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Abhishek" wrote in message news:b4e029bc-8446-4023-a612-d2043741ecec@l42g2000hsc.googlegroups.com... > Hi, > > If i am working in the office environment then the language of office > can be different the language of windows. > Now in IPM.Contact object in the office environment there's a way to > set the Country Name for address of the contact. > While automating on this object model i want to default the country of > the newly created contact to the current country. Now as i understand > i can get the 2/3 letter ISO code for the country from the RegionInfo > class and if use the DisplayName property on this object then i get > the current country as String in the current language of OS. > However there's a possibility that the language of office is different > then the language of OS and in this case i might be defaulring the > country name to a wrong value (Since sam country name can be displayed > as different strings in different languages) > Is there a way to find the country name in the language of outlook or > in other words any given language. > > Any help will be great on this topic.... > > Thanks, > Abhishek
DisplayName will be in the language of CurrentUILanguage, *if* you have the localized resources installed. -- MichKa [Microsoft] Windows International Fundamentals Blog: http://blogs.msdn.com/michkap This posting is provided "AS IS" with no warranties, and confers no rights. "Abhishek" wrote in message news:b4e029bc-8446-4023-a612-d2043741ecec@l42g2000hsc.googlegroups.com... > Hi, > > If i am working in the office environment then the language of office > can be different the language of windows. > Now in IPM.Contact object in the office environment there's a way to > set the Country Name for address of the contact. > While automating on this object model i want to default the country of > the newly created contact to the current country. Now as i understand > i can get the 2/3 letter ISO code for the country from the RegionInfo > class and if use the DisplayName property on this object then i get > the current country as String in the current language of OS. > However there's a possibility that the language of office is different > then the language of OS and in this case i might be defaulring the > country name to a wrong value (Since sam country name can be displayed > as different strings in different languages) > Is there a way to find the country name in the language of outlook or > in other words any given language. > > Any help will be great on this topic.... > > Thanks, > Abhishek