adobe / adobe/spectrum-web-components

Support minimal set of locales out of the box, currently only en-US is supported

Open
#5,647 2 comments 0 reactions 0 assignees View on GitHub
i18n
Dominant language
TypeScript
Stars
1.5k
Forks
262
Avg merge
3d 10h
Merged PRs (30d)
68

Description

### Code of conduct

- [x] I agree to follow this project's code of conduct.

### Description of issue

Adobe has a special Globalization team which has established standards for all products in Digital Experience (DX) side of the business.
It lists 10 locales: `en-US`, `fr-FR`, `de-DE`, `ja-JP`, etc.
See `Technical requirements` -> `Standard DX language set tags` section in [Digital Experience Globalization Standards](https://wiki.corp.adobe.com/display/DMaG11n/Digital+Experience+Globalization+Standards) internal wiki page for more details.

Currently, Spectrum Web Components (SWC) do not provide localizations for components. It is possible to provide localized strings using dedicated props, like `pendingLabel` prop for `sp-button`. However, that means that if some product in DX would like to use SWC, it will need to create wrapper components which provides labels for underlying SWC component. Otherwise, having multiple teams working on a same product, each team will be required to translate same strings on their own, which may end up with the same string being translated differently for some locales, resulting in UI inconsistencies.
For example, `Pending` string for `sp-button` may be translated as `Pendiente` (in Spanish) by team A, and translator for team B may translate it as `Pendiente...`. Such cases are even harder to track if separate product features use different localization products, as in that case translation memory is not even shared.

It will be nice if SWC can provide localization for at least 10 standard DX locales out of the box. That will greatly simplify adopting SWC in DX products, as the need for the wrappers will be gone. It will also increase consistency between different Adobe products using SWC.

### Would you like to track this issue in Jira?

- [ ] Yes, please tell me the ticket number!

Contributor guide

Open the contributing guide

Research direction

Start at the sp-button component's pendingLabel prop and trace how the current en-US strings are supplied. Confirm the exact standard locale tags in the referenced Globalization Standards, then determine how localized strings should be exposed without wrapper components; done means SWC supports the agreed locale set consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.