I have a datePickerDialog to show and it must be localized.
What is the easiest way to do it?
Also I am doing the app to support the language that is not supported by android system yet.
I am ready to create each resource file for strings for translated values but is it possible to achieve this only buy adding resource files?
Maybe adding string values with keys that DatePickerDialog refers at runTime by current culture so it will take my localized values instead of default
Related
I have just completed my new Windows Phone application. Now I want to add it to the store. My problem is, the app is translated into 34 languages and I have to provide screens for each of theese languages. Whenever I want to change the Culture of my Phone, I have to restart it - it takes too much time. My other idea was to change the culture of a running thread in the code but I could not find a working solution. Can you help me with this? I dont want to spend two days on doing screens for the store. o you have any other idea I could achieve this or could you provide some code that works on WP7 which changes the culture?
You can use the following code to change current culture:
CultureInfo currentCulture = new CultureInfo("Culture_Code");
Thread.CurrentThread.CurrentUICulture = currentCulture ;
You can change culture, but you can't force UI to update it automatically. So, you should write some code to change controls localization at runtime. Basically, there will be the one function that updates controls with selected Culture.
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've got few questions about localization apps in Windows 8.
Is there a way to automatic bind translations to UI element apart from element type? Currently I must provide string with id like "welcomeText.text" for textblock and "welcomeButton.Content" for button. It makes creating files with translations more complicated.
Does Windows 8 has similar solutions to this -> http://developer.android.com/guide/topics/resources/string-resource.html#Plurals ?
Thank you in advance,
Chris
Unfortunately I think the answer to both questions is no.
As for question 1:
If you use the standard way of localizing Windows 8 apps you will have to specify the property, which is not great but understandable; how else would the platform know to what property it should bind? Perhaps I want to bind the Header property instead of the Content property.
There is no way for the platform to determine what I want unless I specify it.
I have noticed that when i change phone settings, that some of the applications on the phone change their name based on selected language.
eg. Where you change phone settings is Settings (english), Parametres (french), Configuracion (spanish)
Does anyone know how to do this for my own application?
I can change the strings inside my application. I want to change the application name that is displayed beside (or overtop) the application tile.
Microsoft wrote a detailed guide on how.
And yes, it's a C++ satellite DLL. You're not reading it wrong.
Consider using Patrick Getzmann's Tool to automate the satellite generation
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.