# i18n shows raw keys instead of English fallback when browser language is unsupported (e.g. German)

**URL:** <https://forum.mupdf.com/t/i18n-shows-raw-keys-instead-of-english-fallback-when-browser-language-is-unsupported-e-g-german/334>\
**Category:** WebViewer\
**Created:** [April 6, 2026, 11:40am UTC](https://forum.mupdf.com/t/i18n-shows-raw-keys-instead-of-english-fallback-when-browser-language-is-unsupported-e-g-german/334 "2026-04-06T11:40:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hannesdevelops](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.mupdf.com/hannesdevelops/32/374_2.png) [@hannesdevelops](https://forum.mupdf.com/u/hannesdevelops)\
**Post date:** [April 6, 2026, 11:40am UTC](https://forum.mupdf.com/t/i18n-shows-raw-keys-instead-of-english-fallback-when-browser-language-is-unsupported-e-g-german/334/1 "2026-04-06T11:40:27Z")

</div>

**Environment**

- mupdf-webviewer: 0.1.1 (latest via npm)
- Browser: Chrome 135, macOS
- System language: German (de)
- Browser language: German (de-DE)

**Problem**

When the browser/system language is set to a language not included in the WebViewer’s dictionary (currently only KOREAN, ENGLISH, JAPANESE are supported), the UI displays raw i18n keys instead of falling back to English.

For example, the search panel shows:

- `TEXT_SEARCH_VIEW_TITLE` instead of “Find”
- `ITEMS_UNIT` instead of “items”

The console is flooded with hundreds of warnings:

```auto
chunk-M2RGBLL6.js:279 i18n Dictionary for language "de" not exists.

```

This significantly slows down page loading due to the volume of warnings.

**What I tried**

1. Setting `language: 'ENGLISH'` in the init config — does not help, the i18n system reads `navigator.language` before the config is applied.
2. Calling `viewer.setLanguage(...)` after init — tried multiple formats, none resolved the issue for already-rendered UI elements.
3. Changing Chrome’s language to English — this works, confirming the root cause is the missing fallback.

**Expected behavior**

When the browser language is not in the supported set (KOREAN, ENGLISH, JAPANESE), the viewer should fall back to English translations instead of displaying raw keys.

**Suggested fix**

In the i18n initialization logic, if the detected language has no dictionary, default to “en” before rendering any UI elements. The English dictionary already exists in the codebase (confirmed via grep — `TEXT_SEARCH_VIEW_TITLE:"Find"` is present in chunk-M2RGBLL6.js).

**Workaround**

Changing the browser language to English resolves the issue. However, this is not a viable solution for end users who work in non-English environments — which is the majority of users in continental Europe and Asia (outside Japan and Korea).

**Additional context**

The `languageSchema` shows `ZodEnum` with values `["KOREAN","ENGLISH","JAPANESE"]`. Adding a fallback mechanism would benefit all users whose browser language is not one of these three — including German, French, Spanish, Chinese, and many others.

---

<div class="post-metadata">

**Author:** ![Jamie\_Lemon](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.mupdf.com/jamie_lemon/32/5_2.png) [@Jamie\_Lemon](https://forum.mupdf.com/u/Jamie_Lemon)\
**Post date:** [April 7, 2026, 9:32pm UTC](https://forum.mupdf.com/t/i18n-shows-raw-keys-instead-of-english-fallback-when-browser-language-is-unsupported-e-g-german/334/2 "2026-04-07T21:32:51Z")

</div>

Thanks for this report - we will investigate.

---

<div class="post-metadata">

**Author:** ![Jamie\_Lemon](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.mupdf.com/jamie_lemon/32/5_2.png) [@Jamie\_Lemon](https://forum.mupdf.com/u/Jamie_Lemon)\
**Post date:** [April 8, 2026, 11:48am UTC](https://forum.mupdf.com/t/i18n-shows-raw-keys-instead-of-english-fallback-when-browser-language-is-unsupported-e-g-german/334/3 "2026-04-08T11:48:59Z")

</div>

@hannesdevelops This should now be resolved in version `0.15.0`
