How to set my 'application default language'

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

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

How to set my 'application default language'

Post by anovy »

Hi,
how can I change the value of the 'application's default language'? By other words - how can I change, what real language will be used for -1 parameter? The PDF-XChange uses always English. The only way which I found is to handle the "International.LocaleID" event and then change the LocaleID (e.g. to 0x407) if the current value is -1. However this approach has two disadvantages:
1) Your Properties dialog does not list the English language among the Custom languages, so with this my approach the customer is unable to switch to the English language.
2) Your Properties dialog always says that the application's default language is English.

So it would be great if you will:
1) Add to the list of custom langauges all available langauges (now English is missing).
2) Do not tell that the 'application's default language' is English.
3) Possibly allow to change the value of the 'application's default language' by some SetProperty string. For example SetProperty("International.LocaleID.Default", DataIn(0x0407), 0); This would be the best solution, no event handling will be necessary and you can display this correct 'application's default language' in the Properties dialog.

Thanks for your attention.
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: How to set my 'application default language'

Post by anovy »

Any chance that somebody will reply?
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: How to set my 'application default language'

Post by Vasyl - PDF-XChange »

Hi, anovy.
So it would be great if you will:
1) Add to the list of custom langauges all available langauges (now English is missing).
2) Do not tell that the 'application's default language' is English.
3) Possibly allow to change the value of the 'application's default language' by some SetProperty string. For example SetProperty("International.LocaleID.Default", DataIn(0x0407), 0); This would be the best solution, no event handling will be necessary and you can display this correct 'application's default language' in the Properties dialog.
We will improve it as per your suggestions completely.
In the new build you will be able to:
1. Override the 'application's default language' by SetProperty("International.DefaultLocaleID", <LocaleID>, ...);
2. Select the 'application's built-in language' by SetProperty("International.LocaleID", "BuiltIn", ...);
Wait for the new build and look into our updated SDK help (Reference\Named Items\Objects\International section).

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: How to set my 'application default language'

Post by anovy »

Thank you very much.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: How to set my 'application default language'

Post by Stefan - PDF-XChange »

Our Pleasure anovy :)

Regards,
Stefan
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: How to set my 'application default language'

Post by anovy »

I just tested the new version with "International.DefaultLocaleID", works perfectly, thank you again.
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7371
Joined: Wed Mar 25, 2009 10:37 pm

Re: How to set my 'application default language'

Post by Paul - PDF-XChange »

:-)
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
vzgherea
User
Posts: 23
Joined: Mon Sep 09, 2013 8:38 am

Re: How to set my 'application default language'

Post by vzgherea »

Can not set control's UI language.

Both
SetProperty("International.LocaleID", 0x0407, 0);
and
SetProperty("International.DefaultLocaleID", 0x0407, 0);
result in error. Directory 'Languages' with all lang files is present in the output folder.

GetProperty("International.LocaleID", out dataOut, 0) returns -1.
The only accepted values (which do not result in error) for SetProperty("International.LocaleID") are -1, -2, and "BuiltIn"

Thank you.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: How to set my 'application default language'

Post by Stefan - PDF-XChange »

Hello vzgherea,

Just tested this in our C# Full Demo project (added it to a button):

Code: Select all

axCoPDFXCview1.SetProperty("International.LocaleID", 0x0407, 0);
and it worked correctly and the interface language was changed.

Please check your code and make sure you are calling it correctly and all the language files are where they should be and all will be OK.

Regards,
Stefan
vzgherea
User
Posts: 23
Joined: Mon Sep 09, 2013 8:38 am

Re: How to set my 'application default language'

Post by vzgherea »

Checked the code before writing here.
Tried to do the same as you described in the post above and did not succeed.
Attached Full Demo project with the following changes:

1. Added a button with 'Set UI language' caption
2. In the Click event handler for the button added : axCoPDFXCview1.SetProperty("International.LocaleID", 0x0407, 0);
3. In project properties set Output path to 'bin' directory
4. Copied 'Languages' folder to the 'bin' directory

When clicking added button an error is shown.
Could you please check what I am doing wrong?

Functionality from 'Languages' tab doesn't work neither.

Running VS2010 on Windows 7, 64bit, logged in as Administrator.
You do not have the required permissions to view the files attached to this post.
Last edited by vzgherea on Mon Oct 07, 2013 3:31 pm, edited 1 time in total.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: How to set my 'application default language'

Post by Stefan - PDF-XChange »

Hi vzgherea,

Your sample still works for me (check attached).
Need to speak with someone from the dev team for a further advise why it does work for me and not for you.

Regards,
Stefan
You do not have the required permissions to view the files attached to this post.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: How to set my 'application default language'

Post by Stefan - PDF-XChange »

Hello again vzgherea,

Here are the comments from a colleague from the dev team:
This sample doesn't include the com-server 'PDFXCview.exe'. It means the dev's app uses already installed server on the target machine. Maybe he has it in his app folder. The 'Languages' folder must be located near the 'PDFXCview.exe' file, in the same folder definitely. Dev may check the location of installed and used com-server:

HKEY_CLASSES_ROOT\CLSID\{FA8A2DAF-0603-4D2C-AB34-FAB373B571DC}\LocalServer32

and on x64-OS the location for x86-applications:
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{FA8A2DAF-0603-4D2C-AB34-FAB373B571DC}\LocalServer32

- he may look into this folders for the 'Languages' subfolder and check its contents.

To resolve such collisions between SDK and installed end-user PDFViewer and such misunderstandings - dev may use Click-Once method (it is described fully in our SDK-help) an some sample is on the forum. Sample:
Using this method he will be able to place all files of SDK into one folder and his app will no longer depend on what is doing with end-user's PDFViewer (for example: end-user can remove all languages or uninstall PDFViewer fully).
The click once full demo is attached.
You do not have the required permissions to view the files attached to this post.
vzgherea
User
Posts: 23
Joined: Mon Sep 09, 2013 8:38 am

Re: How to set my 'application default language'

Post by vzgherea »

Hello Stefan,

Using supplied info I found location of 'PDFXCview.exe' com-server being used, copied 'Languages' folder there and after that was able to change the language of application.

Thank you for detailed instructions on solving my issue!
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: How to set my 'application default language'

Post by Stefan - PDF-XChange »

Pleasure to assist vzgherea! :)

Regards,
Stefan