-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Document localization and internationalization - How do we improve Spanish support? #1742
Comments
I agree this is something we need to standardize on and there is no existing documentation in the repository on it. I have also added a new label for i18n to our github issues so we start marking related issues as they come up. |
Reviving this issue after seeing #2399. I think it would be good to have more of a pattern for how we add lang to the application. For example instead of adding lang props as standalone props
We have a specific prop on all components that is the same for lang string content.
That makes it easier for consumers to know where to pass in their i18n localized strings. It also follows the pattern on react-uswds of surfacing props and compose-able React components and allow applications to customize for their use case. With this approach, the library is responsible for keeping an authoritative localization dictionary for i18n for its components. Rather the library would surface the props so the application can pass in the content they need and override defaults. This is a bit different than suggested in the original post though, so looking for more feedback and ideas on this approach. |
I'd be in favor of that. We'd also have to pass in the lang identifier (e.g. " |
@werdnanoslen Oh right I forgot about Maybe we call it |
Does this documentation relate to a specific USWDS feature?
Content should need to be available in English & Spanish
Is your documentation related to a problem or inconsistency? Please describe.
There is nothing that I can find for supporting bilingual content
Describe the documentation you'd like
I assume that we'd be extending it with https://www.npmjs.com/package/react-localization but haven't tested it.
Also see:
https://blog.decipher.dev/internationalization-in-plain-reactjs
The text was updated successfully, but these errors were encountered: