Skip to content

fix(i18n): detectBrowser assigns _locale directly, bypassing setter (post-init loadPath) #213

Description

@ErickXavier

i18n() browser detection sets _i18n._locale = browserLang directly (src/index.js ~519) instead of via the setter (i18n.js:97 → _loadLocale + _notifyI18n).

For the documented config-before-init ordering this is fine (init's blocking load runs afterward). But if NoJS.i18n({...}) is called after init() under loadPath, the detected locale's bundle is never fetched and watchers never fire → t() returns fallbackLocale/raw keys with no re-render.

Decide: either route detection through the setter, or explicitly document/enforce config-before-init. Surfaced by post-release review of v1.16.0. Severity: low (edge/altitude; may be wontfix).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions