Skip to content

Commit ddff6b5

Browse files
authored
docs: add supported locales to provider docs (#9182)
1 parent cf7c154 commit ddff6b5

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

packages/dev/s2-docs/pages/s2/Provider.mdx

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Layout} from '../../src/Layout';
22
import {InstallCommand} from '../../src/InstallCommand';
33
import {BundlerSwitcher, BundlerSwitcherItem} from '../../src/BundlerSwitcher';
44
export default Layout;
5-
import {SegmentedControl, SegmentedControlItem} from '@react-spectrum/s2';
5+
import {Disclosure, DisclosureTitle, DisclosurePanel} from '@react-spectrum/s2';
66

77
export const section = 'Components';
88
import docs from 'docs:@react-spectrum/s2';
@@ -28,14 +28,58 @@ import {style} from '@react-spectrum/s2/style' with {type: 'macro'};
2828
```
2929

3030
## Locales
31-
By default, React Spectrum chooses the locale matching the user’s browser/operating system language, but this can be overridden with the locale prop if you have an application specific setting. This prop accepts a [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code. A list of supported locales is available [here](Concepts.html#supported-locales)
31+
By default, React Spectrum chooses the locale matching the user’s browser/operating system language, but this can be overridden with the locale prop if you have an application specific setting. This prop accepts a [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code.
3232

3333
```tsx
3434
<Provider locale="en-US">
3535
<YourApp />
3636
</Provider>
3737
```
3838

39+
<Disclosure isQuiet>
40+
<DisclosureTitle>Supported Locales</DisclosureTitle>
41+
<DisclosurePanel>
42+
<ul style={{columnWidth: 200, paddingLeft: 16, fontFamily: 'adobe-clean-spectrum-vf'}}>
43+
<li>Arabic (United Arab Emirates)</li>
44+
<li>Bulgarian (Bulgaria)</li>
45+
<li>Chinese (Simplified)</li>
46+
<li>Chinese (Traditional)</li>
47+
<li>Croatian (Croatia)</li>
48+
<li>Czech (Czech Republic)</li>
49+
<li>Danish (Denmark)</li>
50+
<li>Dutch (Netherlands)</li>
51+
<li>English (Great Britain)</li>
52+
<li>English (United States)</li>
53+
<li>Estonian (Estonia)</li>
54+
<li>Finnish (Finland)</li>
55+
<li>French (Canada)</li>
56+
<li>French (France)</li>
57+
<li>German (Germany)</li>
58+
<li>Greek (Greece)</li>
59+
<li>Hebrew (Israel)</li>
60+
<li>Hungarian (Hungary)</li>
61+
<li>Italian (Italy)</li>
62+
<li>Japanese (Japan)</li>
63+
<li>Korean (Korea)</li>
64+
<li>Latvian (Latvia)</li>
65+
<li>Lithuanian (Lithuania)</li>
66+
<li>Norwegian (Norway)</li>
67+
<li>Polish (Poland)</li>
68+
<li>Portuguese (Brazil)</li>
69+
<li>Romanian (Romania)</li>
70+
<li>Russian (Russia)</li>
71+
<li>Serbian (Serbia)</li>
72+
<li>Slovakian (Slovakia)</li>
73+
<li>Slovenian (Slovenia)</li>
74+
<li>Spanish (Spain)</li>
75+
<li>Swedish (Sweden)</li>
76+
<li>Turkish (Turkey)</li>
77+
<li>Ukrainian (Ukraine)</li>
78+
</ul>
79+
</DisclosurePanel>
80+
</Disclosure>
81+
82+
3983
## Client side routing
4084

4185
The Provider component accepts an optional `router` prop. This enables React Spectrum components that render links to perform client side navigation using your application or framework's client side router. See the client side routing guide for details on how to set this up.

0 commit comments

Comments
 (0)