Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feature Request Use CultureInfo of current locale for formatting

Discussion in 'Localization Tools' started by Trisibo, Nov 17, 2020.

  1. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    233
    It seems that when formatting numbers, dates, etc., passed as parameters, the CultureInfo of the system is always being used (when using a "Localize String Event" component or LocalizedString.GetLocalizedString), instead of the one for the curently selected locale, is that right? It seems counterintuitive, since the formats of the arguments wouldn't match the actual language of the text.

    For example, if I have an entry with the text "{0:d}" and I pass the current date, I would expect to get "11/17/2020" for English and "17/11/2020" for Spanish, regardless of the system culture.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,787
    Ah yes, this is something we are working on at the moment. We have a whole load of Smart String improvements in the next version :)
     
    Trisibo likes this.