Description
When initializing the React PDF Viewer with a specific locale configured via the I18n plugin (e.g., Spanish or German), the initial bootstrap messages "Initializing PDF engine..." and "Initializing plugins..." are hardcoded in English.
The viewer fails to respect the defaultLocale or provided translation markers during the critical "pre-init" phase. The UI only switches to the correct language after the engine and plugins have finished loading, which defeats the purpose of localizing the initial user experience.
Steps to Reproduce
- Initialize the React Viewer component.
- Configure the
@embedpdf/plugin-i18n plugin within the viewer instance.
- Set the
defaultLocale to a non-English language (e.g., es for Spanish)
- reload the page.
- Observe the text displayed while the engine is warming up.
Expected Behavior
The React Viewer should check the defaultLocale or the initial configuration of the i18n plugin immediately upon mounting. The loader should display the localized strings for "Initializing..." states from the very first frame of the component's lifecycle.
Actual Behavior
The viewer defaults to English hardcoded strings during the boot sequence. It ignores the i18n configurations until the plugin system is fully initialized, resulting in a "flicker" of English text before the intended language finally kicks in.
Environment Details
- Browser: [Chrome]
- OS: [macOS]
- Framework: [React]
Description
When initializing the React PDF Viewer with a specific locale configured via the
I18nplugin (e.g., Spanish or German), the initial bootstrap messages "Initializing PDF engine..." and "Initializing plugins..." are hardcoded in English.The viewer fails to respect the
defaultLocaleor provided translation markers during the critical "pre-init" phase. The UI only switches to the correct language after the engine and plugins have finished loading, which defeats the purpose of localizing the initial user experience.Steps to Reproduce
@embedpdf/plugin-i18nplugin within the viewer instance.defaultLocaleto a non-English language (e.g.,esfor Spanish)Expected Behavior
The React Viewer should check the
defaultLocaleor the initial configuration of thei18nplugin immediately upon mounting. The loader should display the localized strings for "Initializing..." states from the very first frame of the component's lifecycle.Actual Behavior
The viewer defaults to English hardcoded strings during the boot sequence. It ignores the i18n configurations until the plugin system is fully initialized, resulting in a "flicker" of English text before the intended language finally kicks in.
Environment Details