// Use this for initialization
 void Start()
 {
     GetComponent <Text>().text = string.Format(
         "LANGUAGE ID: {0} \n" +
         "LANGUAGE: {1} \n " +
         "REGION: {2} \n " +
         "CURRENCY CODE: {3} \n " +
         "CURRENCY SYMBOL: {4}",
         PreciseLocale.GetLanguageID(),
         PreciseLocale.GetLanguage(),
         PreciseLocale.GetRegion(),
         PreciseLocale.GetCurrencyCode(),
         PreciseLocale.GetCurrencySymbol()
         );
 }
Ejemplo n.º 2
0
            public Inst Post(Uri url)
            {
                Debug.Log(string.Format("[{0}] POST : {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, url.ToString()));
                var req = (System.Net.WebRequest.Create(url)) as HttpWebRequest;

                if (cert != null)
                {
                    req.ClientCertificates.Add(cert);
                }
                req.Method = "POST";
                req.Headers.Add(HttpRequestHeader.ContentLanguage, PreciseLocale.GetLanguage());
                req.Headers.Add(HttpRequestHeader.ContentLocation, PreciseLocale.GetRegion());

                return(new Inst(mShared, req));
            }
        protected virtual string GetLanguage()
        {
            var language = PreciseLocale.GetLanguage().ToLower();

            Debug.Log("[GetLanguage] language: " + language);

            if (!_languagesSettings.SupportedLanguages.Contains(language))
            {
                if (_languageOverrides.ContainsKey(language))
                {
                    var overrideLang = _languageOverrides[language];

                    if (_languagesSettings.SupportedLanguages.Contains(overrideLang))
                    {
                        return(overrideLang);
                    }
                }

                return(_languagesSettings.DefaultLanguageCode);
            }

            return(language);
        }
Ejemplo n.º 4
0
 private void Start()
 {
     GetComponent <Text>().text = $"LANGUAGE ID: {PreciseLocale.GetLanguageID()} \nLANGUAGE: {PreciseLocale.GetLanguage()} \n REGION: {PreciseLocale.GetRegion()} \n CURRENCY CODE: {PreciseLocale.GetCurrencyCode()} \n CURRENCY SYMBOL: {PreciseLocale.GetCurrencySymbol()}";
 }