I needed to do this for a project, and thought I'd share.
If you declare for example the googleanalytics_account variable with hook_variable_info, it can be made multilingual really easily:
function googleanalytics_variable_info($options) {
$variable['googleanalytics_account'] = array(
'title' => t('Google Analytics account ID'),
'localize' => TRUE,
);
return $variable;
}
For more info: http://drupal.org/project/variable
EDIT:
...and two minutes after posting this I RTFM'd: http://drupal.org/node/595520 (well, the comment by MattFielding)
Comments
Comment #1
hass commentedPlease share a tested patch.
Comment #2
hass commentedComment #4
pedrospShort version:
add on: googleanalytics.variable.inc
line 20: 'multidomain' => TRUE,
(sorry no enough patch/git skills yet)
Explanation & credits:
A recurrent question has been the integration for Google Analytics module with Domain Access.
The work has been done for the 6.x version through Domain Config, however the way to go on Drupal 7 is using Variable and Domain Variable module.
Google Analytics has already been integrated with Variable for i18N purposes: http://drupal.org/node/595520
An additional parameter is needed to show up with Domain realm declared on Domain Variable ('multidomain' => TRUE, ) #1809794: Making Custom variables available in Config form
Comment #5
hass commentedThis is not a patch. i18n has already been added. Open a new case, please.
Comment #5.0
hass commentedi rtfm'd