Hi Vishal, did you check the documentation in GitHub? From the guide: Translating in C#
So you would have the locazation "view model" registered for the languages and then fetch the localized sting using the mentioned code.
Another option would be to ask the question in GitHub on the project so Valdis might spot the question instead of just having it here on the Episerver forums.
Hi Antti,
thanks for your comment, although i have checked github and understand the basic of the viewmodel. Only in my case the text i want to translate comes dynamically from all the languages in Episerver (enabled). So i was looking of a way to translate those.
I meant you would create a dummy view model where you would have the languages listed that you know will be supported and then you would need a mapping from language code for example to a property in the dummy view model. Sort of hack.
What if you just use the "NativeName" property on the CultureInfo object?
Hi i'm using DbLocalizationProvider in a selectionFactory to display the enabled languages in a dropdown.
But i was wondering if you could dynamically sent translation for a string to the DbLocalizationProvider instead of defined [LocalizedModel]/[LocalizedResource].
I want the editors to see the Text of the SelectItem in the language they are in. So translatable ...