AcManager.LocaleHelper.InitializeCustom C# (CSharp) Méthode

InitializeCustom() private static méthode

private static InitializeCustom ( string langId ) : bool
langId string
Résultat bool
        private static bool InitializeCustom(string langId) {
            var found = false;

            var googleSheets = GetGoogleSheetsFilename();
            if (File.Exists(googleSheets)) {
                try {
                    var loaded = SharedLocaleReader.Read(googleSheets, langId);
                    if (loaded.Any()) {
                        CustomResourceManager.SetCustomSource(loaded);
                        found = true;
                    }
                } catch (Exception e) {
                    Logging.Warning(e);
                }
            }

            if (SettingsHolder.Locale.ResxLocalesMode) {
                var localeDirectory = FilesStorage.Instance.Combine("Locales", langId);
                if (Directory.Exists(localeDirectory)) {
                    Logging.Write(localeDirectory);
                    CustomResourceManager.SetCustomSource(localeDirectory);
                    found = true;
                }
            }

            return found;
        }