International.LocaleID

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Post Reply
TomChandler
User
Posts: 21
Joined: Wed May 02, 2018 6:58 pm

International.LocaleID

Post by TomChandler » Fri Feb 12, 2021 7:47 pm

Is there a way to set the LocaleID based on a culture code (i.e. es-ES) in C#? So far I've only found ways to set it this way:
SetProperty(@"International.LocaleID", 0x0c0a, 0);

If not, is there a list of the values for the different culture codes? I've only mange to find a partial list so far. I've found Spanish, French, and German but the Lanugages folder seems to support many more (which my product will in the future as well).

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14331
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: International.LocaleID

Post by Tracker Supp-Stefan » Mon Feb 15, 2021 12:51 pm

Hello TomChandler,

You should be using these Locale IDs:
https://docs.microsoft.com/en-us/opensp ... b0ee3dbc4a

Kind regards,
Stefan

TomChandler
User
Posts: 21
Joined: Wed May 02, 2018 6:58 pm

Re: International.LocaleID

Post by TomChandler » Mon Feb 15, 2021 7:29 pm

Can you clarify the syntax I would need for those? The syntax I've found (and works) looks like this:

SetProperty(@"International.LocaleID", 0x0c0a, 0);

But on that page, it's all based 10 numbers from what I can see. Do I need to convert those to hex?

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14331
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: International.LocaleID

Post by Tracker Supp-Stefan » Tue Feb 16, 2021 12:52 pm

Hello TomChandler,

As per the Viewer Manual:
https://downloads.pdf-xchange.com/PDFV_AX.pdf

You can use either:

Code: Select all

SetProperty("International.LocaleID", DataIn("French(FR)"), 0);
// or:
SetProperty("International.LocaleID", DataIn(0x040C), 0);
And a lists of the hex values can be found online. I e.g. found this one:
https://ss64.com/locale.html

Kind regards,
Stefan

TomChandler
User
Posts: 21
Joined: Wed May 02, 2018 6:58 pm

Re: International.LocaleID

Post by TomChandler » Tue Feb 16, 2021 1:11 pm

Perfect, thank you.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14331
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

International.LocaleID

Post by Tracker Supp-Stefan » Tue Feb 16, 2021 2:06 pm

:)

Post Reply