how to change source file encoding in csharp project (visual studio / msbuild machine)?

Problem: Compiler launched from command line cannot process the source file because of international characters that I’ve just added. Solution: Save source file explicitly in UTF-8 encoding to preserve international characters. How To: open the problematic file in Visual Studio. on the File menu click “Advanced Save Options“ from “Encoding” combo select “Unicode (UTF-8 …“ … Read more

What is the second parameter of NSLocalizedString()?

The second parameter is a comment that will automatically appear in the strings file if you use the genstrings command-line utility, which can create the strings file for you by scanning your source code. The comment is useful for your localizers. For example: NSLocalizedString(@”Save”,@”Title of the Save button in the theme saving dialog”); When you … Read more

WPF XAML Bindings and CurrentCulture Display

It turns out that WPF does not respect the CurrentCulture by default in bindings, and instead defaults to xml:Lang setting defined in the XAML document or en-US if not provided. This is rather lame behavior – not sure why you would NOT have automatic culture formatting applied as every other UI technology, but… Luckily there’s … Read more

Changing locale: Force activity to reload resources?

In your AndroidManifest.xml, add this attribute to your Activity android:configChanges=”locale” In your activity override onConfigurationChanged() @Override public void onConfigurationChanged(Configuration newConfig) { // refresh your views here super.onConfigurationChanged(newConfig); } https://developer.android.com/guide/topics/manifest/activity-element.html#config