I'm looking to utilize the Windows dialogs, such as the Windows.Storage.Pickers.FileSavePicker() or the print dialog with the language my application has selected, not the language that the OS is currently using.
My application can change the language at run time, and it is working nicely for the most part, by doing the following with all my resources set up and the other language installed:
System.Globalization.CultureInfo.CurrentUICulture = new System.Globalization.CultureInfo(selectedLanguageCode);
System.Globalization.CultureInfo.CurrentCulture = new System.Globalization.CultureInfo(selectedLanguageCode);
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = selectedLanguageCode;
However, the only thing that doesn't change is my Windows dialogs, they appear to stay in the language of the OS and not what I've selected in my application.
The methods in question for FileSavePicker do not have any properties or settings that allow me to change the language.
Does anyone have any ideas on how I can change this so if I'm using French on and English computer it will show the Windows dialog box in French?
I'm sorry but Windows dialogs cannot be localized with UWP apps (not sure about WPF projects).
Related
I am using the Translation Manager Included in Delphi (xe8, but should be the same in older version)
I go to Projet->langages->add (choose english).
Then I translate the texts(here the button)
I update it all and compile it all:
I got the .exe and .enu file and it is french.
When I go to Projet->languages->set Active and I choose english, I compile it all and my application is now in english (button says hello)
That's great.
However my goal is that my application AUTOMATICALLY swicthes from french->english when computer config changes
ex : I change my PC settings to english:
(I do the same with keyboard setting)
However my applicatin ALWAYS stays withe the default langage I put in Project->Langages->Set Active
How to make my Project.exe automatically choose the right langage depending on my PC configuration ?
Take a look at http://dxgettext.po.dk/ replacement for standart Translation Manager.
This adds the support of well-known gettext toolset to your project.
I have a really solid computer program that was written for Windows XP. The program still works great and I would like to update the look and feel of the user interface.
At this time, I would like to give the buttons etc. a more sleek, contemporary look. Much better would be to allow functionality of touch and swipe etc. for tablets and such.
Can anyone tell me what tools in Delphi are used to accomplish this? For instance, do I need to change every button and object manually through object inspector or can I update/modify all objects objects within a project using a single set of commands?
You can start by enabling Windows themes, using Project->Options->Appearance from the IDE's main menu. It's on by default since D2007, but won't be on because your app is coming from Delphi 5. (New projects have it turned on by default, but the IDE can't know if you want it enabled or not when importing older projects.)
You can then start looking at adding gesture support by looking into the documentation for TGestureManager and TGesture. There's a TGestureManager for both VCL and FireMonkey (FMX) applications.
Note that for cross-platform support (Android, iOS, and OS X) you'll need to port your application from the VCL to FMX.
I develop my project in Delphi 2010 on Windows 7 (Russian localization).
When I started working on Windows 8 (English) and moved my project to Delphi XE3 I saw standard dialogs (like buttons, headers of MessageDlg and system errors) in English (must be in Russian).
Look at Project - Options - Version Info - Language, and saw Locale ID as "English (United States)" in "Debug Configuration - 32-bit Windows platform".
Look other configurations, and saw in three headlines like "All configurations - All platforms" (where all elements disabled)
Locale ID is "Russian (Russia)" and in all subtitles "32-bit Windows platform" Locale ID is "English (United States)".
OK, I changed in all configurations Locale ID to "Russian (Russia)". But It doesn't work - all messages in English. In properties of builded exe-file Language=Russian (Russia).
Tested it on Windows 7, Vista with Russian localization.
The Locale ID in the version info has nothing to do with the language used for standard dialogs. You can even have multiple entries in version info for different locales.
The language used for standard dialogs depends on the language setting for the current Windows user. It is the same for all applications started under this user account and is independent of the language used inside the application itself.
There's a consts.pas/consts.dcu unit in Delphi source, which contains all the translations of the standard dialogs. You can make a copy of this file and add it to your project. You can make your changes and build your project.
Make sure, that the original consts.pas/consts.dcu is not available (rename/move them).
We're programming in Delphi 2006, using Multilizer 5.1 to translate the program. Now we've to added Polish as a new language in Multilizer. But when we open our executable, Multlizer says "Polish is not supported by the codepage".
If we adjust our regional settings to Polish, whenever we open the executable, the regional settings flip back to the original setting, which is Dutch. Maybe we should set the CodePage setting in our Project Options, but the dropdown list does not give us any options.
Any ideas?
So it turns out we only had to set the Language for non-Unicode programs in the Regional and Language Options in Control Panel. The bad news is that the French version is now having the same problem.
If you want your application to support all possible language regardless of the Regional and Language Options on the user's computer, you'll need to migrate your application to Delphi 2009 or later. Starting with Delphi 2009, Delphi produces Unicode applications. It'll likely take some effort to fix any code that assumes that SizeOf(Char) = 1. But that one-time job should be much less effort than constantly having to deal with code page issues in your Delphi 2006 application.
I am localizing my winform application for french and japenese. We have fileOpenDialog used at some places, when I change the CurrentUICulture to ja-JP or fr-FR, application displays the localized screens But the dialog boxes are shown in English, i.e default OS setting.
Is it not localizable ? or there is any alternative to it?
Thanks.
The Common File Dialogs and Common Item Dialogs are part of Windows itself and use the language of the underlying Windows installation. The only way to change their language is by reinstalling a different language variant of Windows.