Skip to content
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

Decide whether the component library should be localized #30

Open
huyenltnguyen opened this issue Apr 5, 2024 · 2 comments
Open

Decide whether the component library should be localized #30

huyenltnguyen opened this issue Apr 5, 2024 · 2 comments
Labels
status: discussing Under discussion threads. Closed as stale after 60 days of inactivity.

Comments

@huyenltnguyen
Copy link
Member

Description

We currently have English strings in our components as fallback text:

<span className="sr-only">{label || "Close"}</span>

It is for convenience, as components such as CloseButton shouldn't have any label text other than "Close". However, supporting default text requires setting up a localization workflow as well as including the translations in the package bundle.

I'm opening this issue to discuss whether we should:

  • Continue to have default text in the components and have the package localized; or
  • Remove the fallback strings, mark all component content as required, and don't localize the package
@huyenltnguyen huyenltnguyen added the status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. label Apr 5, 2024
@a2937
Copy link
Member

a2937 commented Apr 9, 2024

I am all for localization. Though I wonder if it might be out of scope for a component library.

It also can be a bit of a hassle sometimes depending on how we go about implementing it.

@a2937
Copy link
Member

a2937 commented Apr 10, 2024

To elaborate further I personally wanna vote for option 2. This is a component library and I would rather leave the localization to the site level. Additionally when it comes to localization practices in React (that I am somewhat aware of), they would realistically store those localization in a separate file managed by their own website and use another component to switch the language.

I also fear any workflow we make could interfere with this and potentially bring bloat. It's probably best to just leave the localization to the library users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: discussing Under discussion threads. Closed as stale after 60 days of inactivity.
Projects
None yet
Development

No branches or pull requests

2 participants