Wrong DateTime Localization since 2012 Q2 SP2

5 posts, 1 answers
  1. Denny
    Denny avatar
    6 posts
    Member since:
    Sep 2011

    Posted 20 Sep 2012 Link to this post

    Hello,

    since 2012 Q2 SP2 the RadGridView shows the DateTime Values in en-US culture.
    How can I change the the culture back into the machine culture?
  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 20 Sep 2012 Link to this post

    Hello,

    This behaviour is due to the fact that now the culture used is the one specified as a Language for the containing Window.
    You should set the Language property like so (to have the machine culture applied): 

    public MainWindow()
    {
                InitializeComponent();
                this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);
    ...
    }

    Kind regards,
    Didie
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. Christian
    Christian avatar
    52 posts
    Member since:
    Apr 2011

    Posted 25 Sep 2012 Link to this post

    I am glad that you provided a solution in this thread.
    Nevertheless it has cost me some time to find it.

    As I saw in the forum, this has been a breaking change for many of us developers, so I wonder why this was not marked as such in the release notes.

    It would be nice if you note such changes in the release notes
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 25 Sep 2012 Link to this post

    Hi,

    You are right that we would mark this better in the Release Notes. Currently we have stated those two lines here:
    -> Changing Language property is not respected. 
    -> Language property of the parent FrameworkElement is not respected. Changing Language property is not respected. 

    The documentation will be updated soon with this information as well.


    Regards,
    Didie
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 08 Feb 2013 Link to this post

    Hello,

    In addition to my last answer, I would like to inform you that we have introduced a new property IsLocalizationLanguageRespected of the RadGridView. It is available in our latest internal build. 

    Its default value is 'true' meaning that the formatting will be based on the Language property (default behaviour). Once you set it to 'false", then the CurrentCulture will be respected. 

    Regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top