mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-10 21:55:19 +00:00
Speak every language in the component, not just English
The component bundled English alone: the standalone app fetches its locale files at runtime from URLs its own build emits, which a host serving the library from elsewhere could not resolve, so bundling one language was the self-contained option. Now every locale is a chunk of its own that the host's bundler loads the first time it is needed, with English still bundled in so that the fallback never waits. Element Call starts in the browser's language and follows the host's own setting through a `language` prop; `supportedLanguages` says what it accepts. Translations are shared by every Element Call on the page, so the most recently set language wins for all of them. The harness gets a language picker, and the app and the component share the parsing of locale paths. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
b7285064fd
commit
f994586eeb
@@ -244,6 +244,12 @@ what is inside it, with `html`, `body` and `:root` standing for that root (see
|
||||
`component/build/scopeStylesToRoot.ts`). A host's own page keeps its styles,
|
||||
and Element Call brings its own fonts and design tokens along.
|
||||
|
||||
The component speaks every language the app does. English is bundled in; the
|
||||
other locales are split into chunks the host's bundler loads the first time
|
||||
they are needed. It starts in the browser's language, and follows the host's
|
||||
own language setting through the `language` prop (`supportedLanguages` lists
|
||||
the tags it accepts).
|
||||
|
||||
The package is not published yet. A host installs it as a git dependency on the
|
||||
`component` directory of this repository,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user