Following #2078137: t() should only be used on static string literals,
'placeholder_text_multiple' => t(variable_get('chosen_placeholder_text_multiple', 'Choose some options')),
(among others) was changed to
'placeholder_text_multiple' => variable_get('chosen_placeholder_text_multiple', t('Choose some options')),

But now, a string (e.g. "Choose some options") won't be translated, at least if the variable chosen_placeholder_text_multiple is already stored.

Comments

dafeder’s picture

Title: No translation of text variables » Implement Variable API to allow for translation of text variables
Category: bug » feature

The proper way to do this would be to implement the variable API, as per https://drupal.org/node/1113374

This isn't exactly a bug, but more of a feature request. I need this as well for a project and can probably submit a patch in the next few days.

tgmfn’s picture

You're right. Yes, that would be great, if you could submit a patch when you are concerned with that in your project as well. Thank you very much in advance.

(By now, I've used the old improper t(variable_get(...)) as a quick workaround.)

Hydra’s picture

Status: Active » Closed (duplicate)

As far as I know, there is already an issue with a patch doing this. Please test this patch #1591908: Add Variable module integration (via hook_variable_info) Close this as a duplicate