add getLocalisation for pmc responses
This commit is contained in:
@@ -119,4 +119,9 @@ public class I18nService
|
||||
var rawLocalizedString = GetLocalised(key);
|
||||
return rawLocalizedString.Replace("%s", value?.ToString());
|
||||
}
|
||||
|
||||
public List<string> GetLocalisedKeys()
|
||||
{
|
||||
return _loadedLocales["en"].Value?.Keys.ToList()!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ public class LocaleService(
|
||||
protected LocaleConfig _localeConfig = _configServer.GetConfig<LocaleConfig>();
|
||||
|
||||
/**
|
||||
* Get the eft globals db file based on the configured locale in config/locale.json, if not found, fall back to 'en'
|
||||
* @returns dictionary
|
||||
*/
|
||||
* Get the eft globals db file based on the configured locale in config/locale.json, if not found, fall back to 'en'
|
||||
* @returns dictionary
|
||||
*/
|
||||
public Dictionary<string, string> GetLocaleDb()
|
||||
{
|
||||
var desiredLocale = _databaseServer.GetTables().Locales.Global[GetDesiredGameLocale()];
|
||||
|
||||
@@ -52,7 +52,7 @@ public class LocalisationService
|
||||
|
||||
public ICollection<string> GetKeys()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return _i18nService.GetLocalisedKeys();
|
||||
}
|
||||
|
||||
public string GetRandomTextThatMatchesPartialKey(string partialKey)
|
||||
|
||||
Reference in New Issue
Block a user