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

hass’s picture

Please share a tested patch.

hass’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pedrosp’s picture

Title: Declare variables » Declare variables compatible with Domain Access
Status: Closed (fixed) » Needs review

Short 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

hass’s picture

Title: Declare variables compatible with Domain Access » Declare variables
Status: Needs review » Closed (fixed)

This is not a patch. i18n has already been added. Open a new case, please.

hass’s picture

Issue summary: View changes

i rtfm'd