public static string Translate(string word) { var loc = LocalStorage.GetItem("localization"); if (loc is null) { ChangeLocale("en"); loc = "en"; } return(loc == "en" ? _wordsEn[word] : _wordsUa[word]); }
public object ProvideValue(IServiceProvider serviceProvider) { if (Text is null) { return(null); } var loc = LocalStorage.GetItem("localization"); if (loc is null) { ChangeLocale("en"); loc = "en"; } return(loc == "en" ? _wordsEn[Text] : _wordsUa[Text]); }