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)); }
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); }