Skip to content

Conversation

SkyeYoung
Copy link
Member

@SkyeYoung SkyeYoung commented Aug 12, 2025

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

As described in #3140, https://www.i18next.com/principles/fallback#language-fallback provides the functionality of fallback to the default language, which can be configured directly to achieve the function.

OLD NEW
CleanShot 2025-08-12 at 11 58 49@2x image

Now, untranslated text will use the en text, while translated text will use the corresponding language's i18n.

example:

// zh/common.json
{
  "sources": {
    "consumers": "消费者"
  }
}
image

I found that the menu style after the language is selected was not provided before during development, and I will create a separate PR to implement it later.

Related issues

fix/resolve #3140

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@SkyeYoung SkyeYoung merged commit fd6a069 into apache:master Aug 12, 2025
5 checks passed
@SkyeYoung SkyeYoung deleted the young/feat/fallback-to-default-language branch August 12, 2025 04:13
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.

Show only the languages for which translation is 100% complete.
4 participants