Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to forcely set the current UI language as traditional chinese(Android)?

$
0
0

My project is Android project. I want to forcely set the current UI lanaguage as traditional chinese. But I cannot find the Locale.TRADITIONAL_CHINESE in Xamarin. Does someone know how to set locale UI language? I found some code about Android Java Code as below:

Resource res=getResources(); Configuration conf = res.getConfigration(); conf.locale = Locale.TRADITIONAL_CHINESE; DisplayMetrics dm = res.getDisplayMetrics(); res.updateConfiguration(conf,dm)

My Xamarin C# Code as below: Android.Content.Res.Configuration conf = this.Resources.Configuration; conf.locale = Locale.TRADITIONAL_CHINESE;//<==this is my problem DisplayMetrics dm = this.Resources.DisplayMetrics; this.Resources.UpdateConfiguration (conf, dm);


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>