Culture Localization with Xamarin Forms and .Net Standard

mallibonemallibone USUniversity ✭✭

I recently converted a localized app from PCL to .Net Standard which is localized with RESX files as described on this page: https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/

After migration I noticed that .Net Standard does no longer need the assistant code to determine the language set on the device under Android and iOS. However, when I additionally to the culture also provide a culture such as en-GB.resx it is not recognized and will always fall back to the more generic language. Any idea how I can get .Net Standard to recognize the culture?

Answers

  • ZoliZoli NLMember ✭✭
    edited December 2017

    After migration I noticed that .Net Standard does no longer need the assistant code to determine the language set on the device under Android and iOS.

    What do you mean by this?
    I also use (still with PCL) string localization, but I don't do anything in my Android/iOS code, simple call AppResources.IDS_MY_STRING to get the proper localized string.
    (I don't use extra cultures, only languages)

  • mallibonemallibone USUniversity ✭✭

    @Zoli thanks for your reply, sorry for the confusing sentence. Consider me following the PCL sample to the letter from the docs. So far it seems only possible to get a language but not respect the culture in .Net Standard. Which is odd since the tutorial clearly shows it with cultures.

  • ZoliZoli NLMember ✭✭

    Ok, it's clear now. As of the original question, my latest information about .Net Standard was that it did not support localization resources (one reason I stayed away from it yet). But it seems my info is outdated then (except cultures).

Sign In or Register to comment.