I am using variant Date field to display format as "25 September 2017", when language changed to Arabic it displays Hijri Date, is there a way to control the format to show gregorian calendar with the month names translated to arabic?
Dates are rendered as culture-specific unless specified explicitly.
If you cannot fix it with different variant of language, then you will have to provide your
There is a class in Sitecore called
DataRendered used by FieldRendered to render a date. Notice that there is a way of providing
What does it mean? That you can provide an additional parameter
culture to a field rendered and explicitly say what your culture should be.
Unfortunately, SXA does not provide you an ability to inject custom parameters to field renderer (good idea to add this in the future).
Here is a processor to override:
Find following method
protected virtual Control CreateFieldRenderer(Sitecore.XA.Foundation.RenderingVariants.Fields.VariantField variantField, Item item, bool isControlEditable, bool isFromComposite)
control.Parameters string with your additional parameter. It depends on you where you get it (item, configuration).