Uploaded image for project: 'stripes-components'
  1. stripes-components
  2. STCOM-691

use ReactIntl to localize language, region, and currency values

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 8.0.0
    • Labels:
      None
    • Template:
    • Development Team:
      Stripes Force

      Description

      ReactIntl can now be used to provide locale-specific translations of language, region, and currency values. As long as we have a list of ISO codes, we can use formatDisplayName to correctly localize the values:

      // When locale is `en`
      formatDisplayName('zh-Hans-SG'); //=> Simplified Chinese (Singapore)
      // When locale is `zh`
      formatDisplayName('zh-Hans-SG'); //=> 简体中文(新加坡)
      
      // When locale is `en`...
      // ISO-4217 currency code to localized display name
      formatDisplayName('CNY', {type: 'currency'}); //=> Chinese Yuan
      // ISO-3166 two letters region code to localized display name
      formatDisplayName('UN', {type: 'region'}); //=> United Nations
      

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                zburke Zak_Burke
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases