简体   繁体   中英

For Xamarin.Forms localization, do I need to implement ILocalize?

In Xamarin help page https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?tabs=windows , for "Displaying the Correct Language", it suggests to define interface ILocalize then use DependencyService to get some locale info.

However, My Xamarin.Forms Android app could just pick the right language resource file according to the locale settings of the device, and display rightful language.

So translations are working fine without ILocalize and the implementations. Do I really need ILocalize and the implementations?

No need of DependencyService , Xamarin.Forms automatically recognizes it and gets the appropriate resource file. Docs needs to be updated, an issue was opened for the same

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM