jsakamoto / Toolbelt.Blazor.I18nText

The class library that provides the ability to localize texts on your Blazor app!
Mozilla Public License 2.0
246 stars 23 forks source link

Feature Requests: string[] GetAvailableLanguages() AND AddTranslation(...) #26

Open JRC86 opened 4 years ago

JRC86 commented 4 years ago

Hello. Great work!

string[] GetAvailableLanguages() I'd love to get a list of available languages as a string array, I'd use it to populate a language-selector dropdown.

AddTranslation(string key, string langCode, string? translation) And if possible a way to add a translation for specific languages. Example: I have swedish and english. Let's say I wanna add a translation for the key: "COFFEE" with: AddTranslation("COFFEE","se", "Kaffe"); The english translation would just get the key (no empty strings.)

Perhaps a function that would add multple translations AddTranslations (string key, string[] languages, string[] translations) example: AddTranslations("COFFEE", ["en","sv","fi","de"],["Coffee","Kaffe","Kahvi","Kaffee" ])

/Jonas