Open rgeraghty opened 3 days ago
Should en-AU: display en-GB translations, but use en-AU region?? @rgeraghty
@dannify en-AU would fall back to en-US strings (as no en-AU strings present, like en-GB falls back to en-US) but use the en-AU region (https://github.com/adobe/react-spectrum/blob/main/packages/%40internationalized/message/src/MessageDictionary.ts#L59)
We have option at any time to add strings for en-AU, en-GB, fr-CA, es-MX etc.... if feel its needed, but not required for this this issue request, which is just add additional locales to current lang supported list, to get the region support.
I updated expected behaviour (just now) in issue description to add note for this,
Provide a general summary of the feature here
We would like to support some additional locales for region support, in same way as exists for French (Canada)
Meaning....
Example...
New locales requested...
π€ Expected Behavior?
However, if intl string files added for any of the above, at later stage, then use matching strings files (eg: en-AU string files + region). Looking at current code seems already supported, just need the locales list updated for above,
π― Current Behavior
These will all revert to en-US only
π Possible Solution
From looking at the code, looks like it might be just updating language tables: https://github.com/adobe/react-spectrum/blob/main/.chromatic-fc/constants.js https://github.com/adobe/react-spectrum/blob/main/packages/dev/docs/pages/react-aria/home/I18n.tsx https://github.com/adobe/react-spectrum/blob/main/packages/%40internationalized/message/src/MessageDictionary.ts https://github.com/adobe/react-spectrum/blob/main/packages/%40internationalized/string/src/LocalizedStringDictionary.ts
and some related files like storybook and tests: https://github.com/adobe/react-spectrum/blob/main/.storybook/constants.js https://github.com/adobe/react-spectrum/blob/main/.storybook-s2/constants.js https://github.com/adobe/react-spectrum/blob/main/packages/%40internationalized/date/tests/DateFormatter.test.js https://github.com/adobe/react-spectrum/blob/main/packages/%40internationalized/date/tests/queries.test.js
MessageDictinary looks to already support this functionality, with just adding language codes to support. es-419 might need extra handling as not xx-XX format.
π¦ Context
Match other Adobe areas (pls contact rgeraght, lreis any question)
π» Examples
No response
π§’ Your Company/Team
Adobe
π· Tracking Issue
No response