Q: Is there is any way to use single unified calender localization in multilingual application?
Prob:I have multilingual site (English/Arabic), when i switch language to Arabic "Telerik" localizes calendars in web page (Converts Gregorian to Hijri calender) which causes errors in pages and validation errors in grids editing.
Hints:
UI Version: v.2011.2.712.
.NET Framework 4
sorry for title misspelling :(
9 Answers, 1 is accepted
or my problem is not clear?!
any help will be highly appreciated.
Telerik Extensions for ASP.NET MVC use the current culture to perform globalization. It seems that you want to change the culture but you don't want anything to be globalized. Is this the case? How are you changing the language (in terms of code)? There are two settings which affect internationalization in .NET - CurrentCulture and CurrentUICulture. Date formats and names and number formats are controlled by the CurrentCulture setting and quite a lot depends on that - calendar rendering, number/number formatting and parsing etc.
Regards,Atanas Korchev
the Telerik team
i am changing language like this in global.asax using this approach:
CultureInfo ci = new CultureInfo(langName);//summarizedThread.CurrentThread.CurrentUICulture = ci;Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(ci.Name);What if i want global calender format for all cultures?any workaround?
Thanks in advance.
Currently there is no workaround because there hasn't been any request for such behavior so far. Of course modifying the source code of the calendar is an option.
Regards,Atanas Korchev
the Telerik team
I have a record X in grid containing a cell Y with the value '12/21/2011', when the page is in English it displays the value '12/21/2011' correctly, and every thing work fine in editing (Edit>save).
When i change the language to Arabic it displays the value '01/26/1433' and it is OK, But when I hit Edit button -and i am using popup editing mode- it places '21/12/2011' in calender edit (Gregorian calender), if i hit save without modifying data, the value will be changed to '12/21/1411' (Hijri calender).
IF i changed the language back to English it displays the value '07/03/1991', So the value changed from '12/21/2011' to '07/03/1991' without my intention.
Prob:Grid places Unlocalized value in localized calender edit.
Our localization online demo seems to work as expected. If you change the culture and enter edit mode - the same culture will be used in the date picker. What is different in your grid configuration?
Regards,Atanas Korchev
the Telerik team
It seems that all cultures in that demo uses the same calendar* (Gregorian), so it displays the same date '2012-02-12' for all cultures, But if the Arabic culture is there, it will display different date '03/20/1433' in grid cells (because it converts the Gregorian date to Hijri date), And in editing it will place the original date '2012-02-12' (Gregorian) in the localized calendar control (Hijri), so it will be considered '1412-02-12'.
and after clicking Save it will save the value '1412-02-12' NOT '2012-02-12' or '03/20/1433'.
so it is not an issue of how the calendar displays months and weekdays, it is about the wrong value (unconverted) that had been placed in the right calendar control, and that is why i want to stop the value conversion (calculation).
*I mean by calendar 'how the days, months and years been calculated', Gregorian calendar uses the sun and today is '2012-02-12', the Arabic (Hijri) calendar uses the moon and today is '03/20/1433', and changing culture converts (calculation) between these calendars and not just do translation in UI control.
many many thanks.
Obay;
Is there a chance to send us a sample project which demonstrates the issue?
Regards,Atanas Korchev
the Telerik team