.NET

.NET

Reply
Valued Contributor
PowerKiKi2
Posts: 81
Registered: ‎11-15-2005
Message 1 of 4 (309 Views)
Accepted Solution

Get AutoCAD current culture (language, localization)

309 Views, 3 Replies
11-21-2008 03:58 AM
Hi,



Out of curiosity I was wondering if there is an easy way to get the current culture for AutoCAD ? I basically would like to automatically translate my own application according to AutoCAD's language.



Of course I tried:



System.Threading.Thread.CurrentThread.CurrentUICulture.Name;



But it always returns "en-us" whatever version of AutoCAD is running. Is there an API method which would return the right value ?







PS: by "easy" I mean no registry key such as "ACAD-5001:409" to compare with homemade list...
Autodesk.AutoCAD.Runtime.DynamicLinker.ProductLcid

Best Regards,
Alexander Rivilis.
*Alexander Rivilis
Message 2 of 4 (309 Views)

Re: Get AutoCAD current culture (language, localization)

11-21-2008 05:55 AM in reply to: PowerKiKi2
Autodesk.AutoCAD.Runtime.DynamicLinker.ProductLcid

Best Regards,
Alexander Rivilis.
Valued Contributor
PowerKiKi2
Posts: 81
Registered: ‎11-15-2005
Message 3 of 4 (309 Views)

Re: Get AutoCAD current culture (language, localization)

11-24-2008 02:44 AM in reply to: PowerKiKi2
Exactly what I needed thanks. With whit method I can set the CurrentCulture:



System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(Autodesk.AutoCAD.Runtime.SystemObjects.DynamicLinker.ProductLcid);
Valued Contributor
PowerKiKi2
Posts: 81
Registered: ‎11-15-2005
Message 4 of 4 (309 Views)

Re: Get AutoCAD current culture (language, localization)

11-24-2008 02:44 AM in reply to: PowerKiKi2
(double post)
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.