Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#13 | Screen Shot 2016-09-30 at 11.18.05 AM.png | 37.82 KB | RAWDESK |
#13 | Screen Shot 2016-09-30 at 11.18.15 AM.png | 23.26 KB | RAWDESK |
#13 | Screen Shot 2016-09-30 at 11.18.26 AM.png | 26.68 KB | RAWDESK |
#10 | variable_realm_features_export.png | 66.79 KB | Jose Reyero |
#8 | variable_realm_export.patch | 13.1 KB | Jose Reyero |
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedNot 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
Comment #2
Jose Reyero CreditAttribution: Jose Reyero commentedThis should be a feature request for Variable module.
'Multilingual variables' don't have any own storage anymore and stores its variables using 'Variable store'
Comment #3
Cyberwolf CreditAttribution: Cyberwolf commentedSubscribing.
Comment #4
betoscopioSubscribing
Comment #5
HnLn CreditAttribution: HnLn commentedsub
Comment #6
checker CreditAttribution: checker commentedI'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?
Comment #7
sylus CreditAttribution: sylus commentedsubscribe
Comment #8
Jose Reyero CreditAttribution: Jose Reyero commentedThis 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.
Comment #9
Jose Reyero CreditAttribution: Jose Reyero commentedThe patch for exportable language realms, #1490834: Add support for exportable language variables.
Comment #10
Jose Reyero CreditAttribution: Jose Reyero commentedAdded API documentation and committed.
This is how it looks like (language realms provided by i18n dev version + #1490834: Add support for exportable language variables. )
Comment #13
RAWDESK CreditAttribution: RAWDESK for Colruyt Group Services commentedI'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 :
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 :)