private static void OnLangComplete(object asset, object cookie) { byte[] binaryContents = Service.Get <AssetManager>().GetBinaryContents(asset); if (binaryContents == null) { AlertScreen.ShowModal(true, null, Service.Get <Lang>().Get(LangUtils.DESYNC_BATCH_MAX_RETRY, new object[0]), null, null); return; } JoeFile joe = new JoeFile(binaryContents); Lang lang = Service.Get <Lang>(); lang.AddStringData(joe); }
public static void CreateLangService() { new EnvironmentController(); string locale = PlayerSettings.GetLocaleCopy(); string json; if (!LangUtils.TryLoadLocalStringsFile(locale, out json)) { locale = Service.Get <EnvironmentController>().GetLocale(); if (!LangUtils.TryLoadLocalStringsFile(locale, out json)) { locale = "en_US"; LangUtils.TryLoadLocalStringsFile(locale, out json); } } Lang lang = new Lang(locale); lang.AddStringData(json); }