If a key does not appear in the translations of a language, the translation of the default language (English) should be used. But, if the page is loaded and the language is something other than the default, there are no fallback keys loaded yet and the key is used instead of the translation. Displaying the key provides a worse user experience than displaying an English translation, so we should load the default language always initially.
If the default language is already loaded and the language is switched, all strings that are not translated into the language use the fallback properly.
Goal
Use the default language always initially.
# Load default language always
## Problem
If a key does not appear in the translations of a language, the translation of the default language (English) should be used. But, if the page is loaded and the language is something other than the default, there are no fallback keys loaded yet and the key is used instead of the translation. Displaying the key provides a worse user experience than displaying an English translation, so we should load the default language always initially.
If the default language is already loaded and the language is switched, all strings that are not translated into the language use the fallback properly.
## Goal
Use the default language always initially.
jakob.scheid
added this to the 0.1.0 milestone 2026-07-21 17:24:50 +02:00
Just to clarify: Is it okay if this results in two language files being loaded on startup (the fallback language and the user's selected language), or do you have a different approach in mind?
Just to clarify: Is it okay if this results in two language files being loaded on startup (the fallback language and the user's selected language), or do you have a different approach in mind?
Just to clarify: Is it okay if this results in two language files being loaded on startup (the fallback language and the user's selected language), or do you have a different approach in mind?
Yes, you are absolutely right. I mean that the fallback language and the language selected by the user is loaded initially. Of course, if they are the same, only one language is loaded.
> Just to clarify: Is it okay if this results in two language files being loaded on startup (the fallback language and the user's selected language), or do you have a different approach in mind?
Yes, you are absolutely right. I mean that the fallback language **and** the language selected by the user is loaded initially. Of course, if they are the same, only one language is loaded.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Load default language always
Problem
If a key does not appear in the translations of a language, the translation of the default language (English) should be used. But, if the page is loaded and the language is something other than the default, there are no fallback keys loaded yet and the key is used instead of the translation. Displaying the key provides a worse user experience than displaying an English translation, so we should load the default language always initially.
If the default language is already loaded and the language is switched, all strings that are not translated into the language use the fallback properly.
Goal
Use the default language always initially.
Just to clarify: Is it okay if this results in two language files being loaded on startup (the fallback language and the user's selected language), or do you have a different approach in mind?
Yes, you are absolutely right. I mean that the fallback language and the language selected by the user is loaded initially. Of course, if they are the same, only one language is loaded.