Announcement

Collapse
No announcement yet.

Default CultureInfo

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • DierkDroth
    started a topic Default CultureInfo

    Default CultureInfo

    https://dev.deck.net/076d90427bc3afc73a4ed42ee582ee2c

    I see
    iv
    ... in the output window instead of something like
    en-US
    ... following the logic here
    https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
    >> The culture name in the format languagecode2-country/regioncode2. languagecode2 is a lowercase two-letter code derived from ISO 639-1. country/regioncode2 is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag.

    This is on Windows 10, Google Chrome 58
    ​​​​​​​
    Is that expected?
    Last edited by DierkDroth; 2017-05-19 @ 08:00 AM.

  • Leonid
    replied
    Moving to Help forum.

    Leave a comment:


  • DierkDroth
    replied
    Understand Vladimir

    Thanks for clarification.

    Leave a comment:


  • Vladimir
    replied
    Hi,

    In javascript, we have no access to such machine setting (there are settings unique for each browser but it is not part of any specification). Also, we cannot attach all locales to a page by default because the code for locales is quite big. So, you have to manually attach required locale to the page

    Leave a comment:


  • DierkDroth
    replied
    Vladimir would you mind providing clarification on my inquiry above?

    Thanks in advance

    Leave a comment:


  • DierkDroth
    replied
    Thanks

    To clarify: the approach you suggested would not set the CultureInfo as per the current machine's settings (like in .NET), but I had to explicitly set it in code, correct?

    Leave a comment:


  • Vladimir
    replied
    Yes, it is expected. Default culture in Bridge is invariant culture, like if you have in .NET
    Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
    If you want to use different culture then you can attach required culture via bridge.json (https://github.com/bridgedotnet/Brid...ration#locales) and set the culture in C#, like
    CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en-US");

    Leave a comment:

Working...
X