Skip to content

[2.x] fix: use the forum default language for missing translations - #5432

Merged
imorland merged 4 commits into
2.xfrom
im/plan-issue-4763
Nov 8, 2026
Merged

imorland merged 4 commits into
2.xfrom
im/plan-issue-4763

Conversation

@imorland

@imorland imorland commented Nov 8, 2026

Copy link
Copy Markdown
Member

Fixes #4763 (Make the translation fallback locale configurable, currently hardcoded to en)

Changes proposed in this pull request:
Missing translations currently jump to English even when the forum has another default language. Use the existing Default Language setting and its parent locales before English, preserving the selected language's precedence. Refresh forum and admin translation bundles when the default changes, and preserve reference targets across regional fallbacks.

Reviewers should focus on:

  • Regression tests failed before the corresponding fallback, cache-refresh, reference-context and empty-default fixes, and pass with them.

Screenshot
Before

French Canadian selected, with missing strings falling back to English

After

French Canadian selected, with missing strings falling back to the German forum default

Recording: changing the default language

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Frontend changes: tests are green (run yarn test in js/).
  • Frontend changes: tests have been added, or are not appropriate here.
  • Backend changes: tests are green (run composer test).
  • Backend changes: tests have been added, or are not appropriate here.
  • Where applicable, changes are suitable for all supported database drivers (MySQL, MariaDB, PostgreSQL, SQLite).
  • Core developer confirmed locally this works as intended.
  • The description above is written by me and describes what this pull request actually does.

@imorland imorland added this to the 2.1 milestone Nov 8, 2026
@imorland
imorland marked this pull request as ready for review November 8, 2026 13:22
@imorland
imorland requested a review from a team as a code owner November 8, 2026 13:22
@imorland
imorland merged commit c392ad3 into 2.x Nov 8, 2026
36 checks passed
@imorland
imorland deleted the im/plan-issue-4763 branch November 8, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the translation fallback locale configurable (currently hardcoded to en)

2 participants