-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Load default language overrides #35209
[4.0] Load default language overrides #35209
Conversation
*/ | ||
if (!$this->debug && $lang !== $this->default) | ||
{ | ||
$this->loadLanguage(JPATH_BASE . '/language/overrides/' . $this->default . '.override.ini'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for my own clarity - we call loadLanguage
instead of parse
directly so it can go into $this->strings
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, parse
only returns the strings loadLanguage
parses internally and put it in $this->strings
. Important is, that we don't do it in $this->override
otherwise we would override again and again but we just handle it like a normal ini language file.
Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
I have tested this item ✅ successfully on ee4dd24 Thank you. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35209. |
I have tested this item ✅ successfully on ee4dd24 Thanks. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35209. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35209. |
Thanks |
Summary of Changes
On multilingual sites the translations of language strings falls back to the default language (when not in debug mode). But if you have created some language overrides this behaviour does not apply.
Testing Instructions
TEST_CONSTANT="Test"
for the english frontend languageecho Text::_('TEST_CONSTANT');
Actual result BEFORE applying this Pull Request
TEST_CONSTANT
is outputted.Expected result AFTER applying this Pull Request
Test
is outputted.