Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14647

In my language "%1$.1f" should become number with comma (12,3 not 12.3)

    XMLWordPrintable

Details

    • Improvement
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 3.1.9
    • None
    • None

    Description

      In the translation files for my language (da) we have strings that contain "%1$.1f".

      In english this might become "12.3" with a ".".
      But in my language is should become "12,3" with a ",".

      This can be changed with PHP's setlocale() funtion like if you put this line at the top of /phpBB3/language/da/common.php:
      setlocale(LC_ALL, 'da_DK.UTF-8');

      I dont see the ability to set PHP's setlocale function in phpBB3 is this correct?
      What is the correct way to fix this?

      Sadly the string to use "da_DK.UTF-8" is different from system to system so there is not just one string that works for all, but you can use multiple string and check the return value to see if it was accecpted.

      So you could have:
      $returnvalue = setlocale(LC_ALL, 'da_DK.UTF-8', 'Danish_Denmark.1252', 'danish_denmark', 'danish', 'dk_DK@euro');

      Attachments

        Activity

          People

            Unassigned Unassigned
            DavidIQ David Colón
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: