I tried to set up a multilanguage project, but i18n variable translation does not work in connection with i18n-module version 6.x-1.10.
There was a change in i18n module in 2010. Translation of the i18n variables is processsed in hook_boot() now (commit: http://drupalcode.org/project/i18n.git/commitdiff/ec42768875ad6f91f20c3f...).
So adding the multilanguage variables to $conf array should not be done in hook_init() anymore, but in hook_boot() to make it work.
The follwowing modules are affected at leat: uc_credit, uc_paypal, uc_payment_pack
The following comment shows this multilanguage solution as well:
http://drupal.org/node/313272#comment-3315478
A workaround for developer: add the required variables to settings.php as proposed in http://drupal.org/node/313272 until this issue is fixed.
Comments
Comment #1
longwaveThis is likely a duplicate of #834290: Address fields are no longer multilingual variables and cannot be translated. See #834290-44: Address fields are no longer multilingual variables and cannot be translated where firewing1 investigated the problem and apparently tracked it to a bug in i18n: #1205804: Variables set in the submit handler functions of forms are updated but never created in i18n_variables
Are you saying there is no bug here, and simply moving hook_init() to hook_boot() should work?
Comment #2
TS79 commentedYes, this move should work. You can simply test it in your other issues:
Just call i18n_variable_init($langcode = NULL); in you hook_init() after you added the variables to conf-array. Translation should work now.
i18n_variable_init() is called only once by i18n-module and processes the translation. And that is done during i18n_boot() (late hook-call by module weight 10). All variables, which have not been set to conf-aray at this time, won't be translated.
Comment #3
longwaveExactly which variables were you having trouble with here? I have tested the checkout completion messages and these work as expected with the current version of i18n. The address fields are a different issue as they don't use system_settings_form().
Comment #4
longwaveThe address fields in 6.x have been fixed by #834290: Address fields are no longer multilingual variables and cannot be translated, I can't reproduce this with other fields with the latest Ubercart and i18n.