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 Caching makes it a little harder to support translation tools (Trac #4620) #4620
Comments
cash wrote on 42480630-05-12 Turn off the system cache and everything will be loaded as in Elgg 1.7 through Elgg 1.8.3. In the future we could provide a function to load that info when required or cache it. Thanks for the report. |
trac user fmestrone wrote on 42483016-09-06 Thanks. I think the only thing it takes is the caching of language_paths as well, so that when needed the
inserted at line 446 of engine/lib/cache.php and
inserted at line 248 of engine/lib/languages.php almost does the job. |
cash wrote on 42483026-08-19 If the language paths are cached, you'll want to call reload_all_translations() to get everything loaded. |
Title changed from |
My translation rewrite solves this. Assigning to 1.9. |
Pushing this off to 1.10 |
The translation editor works pretty well with Elgg 1.9.x, so i am unclear why we should keep this ticket open. |
Original ticket http://trac.elgg.org/ticket/4620 on 42480618-03-23 by trac user fmestrone, assigned to unknown.
Elgg version: 1.8.6
I have noticed that once language translations have been loaded for the first time and cached, the language_paths variables in $CONFIG is not reset in subsequent requests and will only contain the top level languages directory, but none of the plug-in ones.
While this is not a problem for the running of the site as such, it means that there is no easy way to get access to a list of all translation files and even a list of all available localisation within the product installation. This breaks the behaviour of certain plug-ins like the translation_editor.
This new behaviour is implemented in _elgg_load_translations(), line 141 of languages.php in engine/lib. In plugins.php instead I noticed that if languages have been cached, languages are not loaded from plugins anymore (line 314). This is what causes problems when trying to access all language data.
Please ask if not clear. I hope that in the future, when I have learned a bit more about this amazing platform, I will be able to actually submit a patch for issues that I find ;-)
The text was updated successfully, but these errors were encountered: