Hello,
I had this nightmare of strings all over the place not translating. I tracked it down to this line of code which is supposed to return TRUE (my source language was set to english and the language I was viewing the site with was arabic). But instead it was returning FALSE.
$translate[$langcode] = variable_get('i18n_string_translate_langcode_' . $langcode, i18n_string_source_language() != $langcode);
I searched the database variables table and I indeed found i18n_string_translate_langcode_ar & i18n_string_translate_langcode_en. I have no idea how they were even set, also they were blobs (7 bytes each). I deleted them and everything went back to normal. My question is, how did they get set in the first place? A quick search left me with this line of code:
$variables['i18n_string_translate_langcode_[language]'] = array(
'type' => 'multiple_language',
'title' => t('Enable translation for language'),
'multiple values' => array('type' => 'boolean'),
'group' => 'i18n',
);
But I still don't understand how they were set and where they got their values from. Can someone from the i18n team shed a light on this? Where do these variables get set from? This maybe the cause of half strings not translating bugs and would render the variable translation module quite useless.
Comments
Comment #1
jose reyero commentedYes, you can set them with the 'Variable Admin' module. (?)