Problem/Motivation
The 1.x branch used to only get translations for all enabled languages.
As 2.x is a backport from D8 (which has no enabled/disabled state), it gets translations for all installed languages. If a language is disabled however, probably no interface translation is desired, so this is just extra download time and wasting disk space.
Proposed resolution
a) Only deal with enabled languages by default (such as in 1.x)
and/or
b) add a variable to either get translations for all enabled or all installed languages
Remaining tasks
User interface changes
If we add a variable, we will want to be able to set it in the admin UI.
API changes
Possibly: l10n_update_translatable_language_list() returns all installed languages as of yet.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2355557-enabledonly-2.patch | 624 bytes | Sutharsan |
#1 | 2355557-enabledonly-1.patch | 623 bytes | stefan.r |
Comments
Comment #1
stefan.r CreditAttribution: stefan.r commentedOne of these patches makes us only download enabled languages, the other merely adds a variable and other than that everything still works as in rc2 (but I wonder what the added benefit is to downloading disabled languages?)
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedAlthough 7.x-2.x is a backport of 8.x, the is no requirement to translate disabled languages. It has not been requested in the issue queue. I will check 8.x for this behaviour as it has not been the intention to add it in 8.x too. Changing category to "bug".
You code will not work in PHP < 5.4.0. Therefore I have simply used the method from 7.x-1.x.
Comment #3
stefan.r CreditAttribution: stefan.r commentedThanks, patch looks good to me.
Comment #5
Sutharsan CreditAttribution: Sutharsan commentedThanks, committed.