Xamarin iOS localization using .NET

后端 未结 2 951
时光取名叫无心
时光取名叫无心 2021-01-05 13:03

I\'m trying to use .NET localization in a portable class library for a Xamarin iOS/Android project. I\'ve followed the steps at:

How to use localization in C#

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-05 13:37

    I created a similar solution to the accepted answer but using txt files instead of Resx and nuget ready to go: https://github.com/xleon/I18N-Portable. Blog post here.

    Other improvements are:

    • "anyKey".Translate(); // from anywhere
    • Automatic detection of the current culture
    • Get a list of supported translations: List languages = I18N.Current.Languages;
    • Support for Data Binding in Mvvm frameworks / Xamarin.Forms
    • etc

提交回复
热议问题