openfoodfacts / search-a-licious

🍊🔎 A pluggable search service for large collections of objects (like Open Food Facts)
https://search.openfoodfacts.org
GNU Affero General Public License v3.0
6 stars 4 forks source link

i18n support for webcomponents #161

Open alexgarel opened 2 weeks ago

alexgarel commented 2 weeks ago

What

alexgarel commented 2 weeks ago

@alexfauquette, @VaiTon I would appreciate your insights on that (if you have some ;-))

alexfauquette commented 2 weeks ago

What I usually see is a localeText object:

The object can either be set globally (defined once for the entire app) or locally (defined for only one component

Its value can either be string for fixed translation. For example: { nextPage: "Page suivante" } or functions { currentPage: (pageNumber) => page numéro ${pageNumber} }

Kout95 commented 2 weeks ago

i18n for lit.dev https://lit.dev/docs/localization/overview/

Kout95 commented 1 week ago

https://crowdin.com/

alexgarel commented 1 week ago

Being compatible with crowdin is useful, see https://support.crowdin.com/supported-formats/