I have an old WTL project, basically a property sheet form with a few property pages. I want to add localization to it. Microsoft really-really wants me to use separate resource-only DLL for localization. I would like to see if I can do it with all language specific resources in the same executable.
When I add a property page I call CPropertySheetImpl<T>::AddPage, which internally calls CreatePropertySheetPage with a parameter of type PROPSHEETPAGE. I thought I can set the language with SetThreadLocale or SetThreadUILanguage but neither of those works if there is a dialog with Neutral language in the resource (.rc) file. The system overrides the thread settings and picks neutral language dialog over my chosen language. If there are two specific languages (for instance English and German) then the system selects the one that is set in thread settings.
Is this a known "feature" of Windows, or am I doing something wrong? Maybe I shouldn't have resources with neutral language. Maybe there is a better alternative to SetThreadLocale.
In the end I removed Neutral language resurces.
Related
When I created an ATL ActiveX control with property pages I used CLSID_StockColorPage to add an universal "Color" property page, but it is not localized (English always). Is there a way to use at least a system language?
Same with CLSID_StockPicturePage and CLSID_StockFontPage.
I have two different language i.e English and German in my web app and user can change the language in application through a select box. Initially i am getting preferred language from the back-end and i am setting locale of the core as follows.
sap.ui.getCore().getConfiguration().setLanguage("//according to whatever is coming from back-end")
Now lets say initial language is English, if user open a control i.e sap.m.datepicker, calendar is being displayed in English. If user changes the language to German from the application i am again changing the language in the core as shown below:
sap.ui.getCore().getConfiguration().setLanguage("de-DE")
Now if user opens that same datepicker, it is being displayed in English instead of German and if user opens some another control or datepicker it is being rendered in German.
Page is not getting refreshed while changing the language in app.
Please suggest me a solution to dynamically change the locale of the controls.
Maybe my answer here helps a little.
The problem is that in many cases, maybe even in most cases, the standard UI5 controls detect the language only once when they get loaded. Very often, the control developers did not implement a "dynamic change" of the language. If you check the link I mentioned above you will see that there are ways to react on language changes, but very often this is not implemented for whatever reason.
However, I'm afraid to tell you that in your case the standard control might not support dynamic language changes out of the box (but I did not check the code). Also, it seems that the UI5 guys at SAP do not consider this as a bug (see this github issue). Such a pity...
I would suggest you use sap.ui.core.Core.attachLocalizationChanged(fnFunction, oListener) and add this to the onInit function of your controller.
From this, in your fnFunction rebuild the controls where you require the locale changes to be dynamic.
example:
onInit: function(oEvent) {
sap.ui.getCore().attachLocalizationChanged(this._handleLocalizationChanged, this);
},
_handleLocalizationChanged: function() {
// ... Some logic to re-build / set locale for the dynamic controls.
}
This is my interpretation of what should be done based on the information in the api
I'm trying to make the language switcher to work, I have already made all menus for each language I was gonna use, but when I enable this module, It just shows me the name of the module(when I put it to show), not the flags. What should i do?
I lost a full day of my life with this topic.
The issue was that language tag was badly setup in System -> Language Manager -> Content
For example for French I had fr when it should have been fr-FR
After that I had to rebuild/redo all the Language assignments for French on Pages, categories, menus, template.
The flag finally showed up...
It's an old question but, telling from the comments, a recurring problem. Seems like there can be multiple root causes. One thing to check is also that you have marked the default menu item for each language. If not, the corresponding language does not show in the language switcher.
Found that You need to set a default homepage that can be in hidden menu (and redirect from later) to Language "All"
But then also go to each menu and make the page 1 language and also Homepage.
So for me I have now 3 language homepages menu items. All, En, De
How did I discover this:
I needed to turn on a module in the Admin:
Language Status Administrator Module
This makes a small button bottom left in the Admin, and modal points out 3 different topic per language installed, told me I had not any homepages, and so would get no flags. (Thanks to Per on Joomla forum answer from 2016)
Happy fixing.
you need to set up the languages in the Language Manager? under extensions..
and make sure you published the "System - Language Filter" plugin.
Plugins -> System - Language Filter -> Automatic Language Change -> No
This will prevent automatic language changin which is often reason for this
I finished a new WP7 app and I made it possible to switch to different languages via custom code.
I'd like to add English and French, currently it is only set to German.
When I try to submit it to the marketplace, I only have the option to fill out the german info, but how can I declare my app to be also available in EN and FR?
See the HowTo: on MSDN.
The idea: If you have resources for supported languages, you need to declare them in .csproj file
<SupportedCultures>de-DE;fr-FR;us-EN;</SupportedCultures>
Thanks to Anton I came to the solution:
If you end up like me, do this to add different language support for your app manually (without filling out resources):
Create new resource items in your project and call them AppResources.en-GB.resx etc. It should fit to the syntax. You don't need to fill out or explicitly use those resource files.
After that, you go to your .csproj file of your project and add (see above posts) those language infos into it. Then, you'll see that the marketplace recognizes those languages.
I have an application in Windows Phone 7.0 and now I want to make it multilingual supporting both English and French languages.
Could anybody guide me through the approach I should follow for supporting it in multilingul.
Thanks
SAM
The recommended approach is to expose any ResourceManager instances as XAML Resources (via a wrapper class, since the resources are only available at runtime). You can then bind to the properties of the strongly typed ResourceManager in XAML.
Here is some documentation that might help:
How to: Build a Localized Application for Windows Phone
Globalization and Localization for Windows Phone
And some other resources to help:
PhoneCommonStrings contains strings commonly used in WP7 applications, localized to all available languages (disclaimer: I'm the author of the library)
BindableApplicationBar allows you to bind the text (and command) of your application bar buttons
Look at my blog: I just wrote about this very subject a couple weeks ago. It gives you step-by-step instructions.
Basically:
Create the project
Edit the .csproj file in notepad to add the desired cultures to the tag.
Select a neutral culture in the project's properties
Add Resources to the project in Solution Explorer
Create a class to access those resources
Add that class to the tag of the App.xaml file
Put your strings into the Resources file
Bind to those strings using the resource binding in your xaml.
If using an ApplicationBar, you must do so in code, as it cannot be bound in xaml.
Create another resource file for each supported culture.
Create dll files for each supported language, so the title will be correct on the tile and program list.