Пример #1
0
 private static Task <Dictionary <string, I18n.Translation> > DefaultUnityLocaleLoader(string localeToLoad)
 {
     try {
         var listJson = ResourcesV2.LoadV2 <string>("Locales/" + localeToLoad);
         var list     = JsonReader.GetReader().Read <List <I18n.Translation> >(listJson);
         return(Task.FromResult(list.ToDictionary(e => e.key, e => e)));
     } catch (Exception) { }
     return(Task.FromResult <Dictionary <string, I18n.Translation> >(null));
 }
Пример #2
0
 private static string DefaultUnityLocaleLoader(string localeToLoad)
 {
     try { return(ResourcesV2.LoadV2 <string>("Locales/" + localeToLoad)); } catch (Exception e) { Log.w("Could not load json for locale=" + localeToLoad, e); }
     return(null);
 }