Currently I tried to set up a feature with strongarm to store some variables and quickly realized that only the default language variables can be handled via Strongarm.

My question is simple: are there any ongoing plans to support Strongarm module for multilingual variables? Is this even possible at all?
I believe this would be an essential addition.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jose Reyero’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Not for 6.x

But for 7.x we'll see about a generic solution to export 'variable realms/variable store', see http://drupal.org/project/variable

Jose Reyero’s picture

Title: Strongarm support for multilingual variables » Strongarm support for Variable store (multilingual variables)
Project: Internationalization » Variable
Component: Compatibility » Code

This should be a feature request for Variable module.

'Multilingual variables' don't have any own storage anymore and stores its variables using 'Variable store'

Cyberwolf’s picture

Subscribing.

betoscopio’s picture

Subscribing

HnLn’s picture

sub

checker’s picture

I'm also interested in this make useable with features, ctools and strongarm. Are there other ways to import or export variable_store? I have a look inside the i18n_variable module admin, how it sets a default variable to a i18n variable. As i can see there is nothing like an api?

sylus’s picture

subscribe

Jose Reyero’s picture

Title: Strongarm support for Variable store (multilingual variables) » Features support for Variable store (multilingual variables, strongarm support, variable realm controller)
Category: feature » task
Status: Active » Needs review
FileSize
13.1 KB

This patch adds exportable variable realms:

- Introduces two new hooks: hook_variable_realm_info(), hook_variable_realm_controller()
- Introduces new RealmController classes.
- Allows exporting all defined variables at once.
- Will support exporting all language variables.

Notes:
- This new RealmController will allow later simplifying realm creatiion and handling. As these classes will be needed at boot to create some realms we need a simple hook, that is why the two hooks.
- A patch to create exportable language realms is coming, we only need to implement i18n_variable_variable_realm_controller().
- Though it seems easier to add this feature to variable_store, this will allow other modules with different storages to export their realm variables.
- These new hooks need documentation.

Jose Reyero’s picture

The patch for exportable language realms, #1490834: Add support for exportable language variables.

Jose Reyero’s picture

Status: Needs review » Fixed
Issue tags: +Needs change record
FileSize
66.79 KB

Added API documentation and committed.

This is how it looks like (language realms provided by i18n dev version + #1490834: Add support for exportable language variables. )

Exporting variable realms

Status: Fixed » Closed (fixed)
Issue tags: -Needs change record

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

RAWDESK’s picture

I've tried to feature export/import the bilingual variable site_slogan using this added functional support for strongarm module, but my efforts have been unsuccessful until now.

This is the relevant feature export portion in MY_FEATURE_MODULE.strongarm.inc :

$strongarm = new stdClass();
  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
  $strongarm->api_version = 1;
  $strongarm->name = 'site_slogan';
  $strongarm->value = 'My dutch site slogan description.';
  $export['site_slogan'] = $strongarm;

It is only containing the dutch slogan description, where i expected to see also the french version to be added.

See screenshots for relevant enabled features.
Am i missing something ?

#UPDATE#
Missed one export file apparently : MY_FEATURE_MODULE.variable.inc contains the site_slogan realms on nl and fr language.
Works as designed :)