Custom propery converter and input parameter 'culture'
Does anyone have an example of how to read culture as parameter or, for example, default value as parameter in the custom property converter (IPropertyValueConverter)?
Because when I look at the instructions, I can't find anything tangible. To sum up:
I have a custom datatype, for example string, to make it easier
then I make 'my' property converter (IPropertyValueConverter) where I want to format the value in my own way - this was rather simple
then I would like to send to property converter (from current culture 'en') another language, say 'de', and then concatenate mapped value with this value
// let say that value for data type 'whatever' is 'test'
// current culture is 'en'
string x = Model.Content.Value<string>("whatewer")
// should return 'test'
x = Model.Content.Value<string>("whatewer", "de")
// should return 'test-de'
(Of course I'have more complex task for solve, above 'concatenating' is just for example)
What do I have to override in the property converter to get culture = 'de' inside.
this gives current culture 'en'
var currentCulture = this.variationContextAccessor.VariationContext.Culture;
Custom propery converter and input parameter 'culture'
Does anyone have an example of how to read culture as parameter or, for example, default value as parameter in the custom property converter (IPropertyValueConverter)? Because when I look at the instructions, I can't find anything tangible. To sum up:
(Of course I'have more complex task for solve, above 'concatenating' is just for example)
What do I have to override in the property converter to get culture = 'de' inside.
this gives current culture 'en'
I want 'de' instead
Regards
is working on a reply...