Skip to content
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

Language overrides fail after get_installed_translations() when system_cache enabled (Trac #4840) #4840

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 3 comments
Labels
Milestone

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/4840 on 42663771-02-11 by beck24, assigned to unknown.

Elgg version: 1.8

http://community.elgg.org/discussion/view/1081969/language-strings-and-caching-problem

During boot, if languages have been cached the plugin language files aren't registered in $CONFIG

Then if get_installed_translations() is called it reloads the core language file and resets any strings that are elgg_echo'd afterwards.

@elgg-gitbot
Copy link
Author

Dhrup2000 wrote on 42664489-04-10

function add_translation($country_code, $language_array) does not load the language file's path for a language and so -> function register_translations($path, $load_all = false) executes (occasionally?) it will override any language file that has the *same language code - namely 'en; will be overridden the core language file - therefore the original intended override is lost, suggest => primes the array $load_language_files[[ with any 'en' language files that are/were brought in by plugins language files.

@elgg-gitbot
Copy link
Author

trac user hellekin wrote on 42932666-01-10

A possible (untested) fix would be to use array_reverse twice with array_unique in elgg_register_translations, so as to keep the last occurrence, instead of the first one.

cash added a commit that referenced this issue Feb 23, 2013
@cash
Copy link
Contributor

cash commented Feb 23, 2013

@beck24 try this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants