This issue to inform you that I've starting porting the i18n_variables functionality to D7 as a separate module (i18nvariables.module). In D7 the hook_language_init() can be used to initialise those variables. I'm not sure what the upgrade path will look like though. I've also added a screen where one can select which variables to turn into a multilingual variable. I'll post a first version next monday.

Comments

greenc’s picture

+1

brucepearson’s picture

In D7 do you think it will be possible to define which variables should be multilingual without having to add them to the settings.php file?

Ideally it would be nice to be have a UI so that you can define which variables should be multilingual.

Jose Reyero’s picture

Title: i18nvariables for D7 » i18nvariable for D7
Version: master » 7.x-1.x-dev
Issue tags: +drupal7

I've just branched the code to start D7 upgrade.

This 'i18nvariable' (preferred name) module should be an API module with no dependencies on other i18n modules.

About defining variables some other way, yes, I'd like to see some hook_i18nvariable('list'). I think it could be something like 'variablename' => Short description so we can present somewhere a human readable list of variables.

Jose Reyero’s picture

Btw, there's a last change in i18n 6.x that may be of interest here:

In order to be able to properly initialize i18n variables, often needed before all the modules have been loaded, we just load whatever multilingual variables are stored in the db, so we don't need to rely on module hooks at this stage.

Jax’s picture

  • I didn't succeed in having a working version for today. I'll have to finish it next weekend.
  • Jose, you're saying that it should be an API module? But wouldn't an UI for selecting which variables you want to make multilingual also fit into this module?
Jose Reyero’s picture

@Jax,
We are focusing on getting the basics working for D7 for now, and though such an UI would be a nice feature, it's not hight priority atm.

Also fyi, we are doing some other work about collecting variable metadata that will be here soon, this should make possible to provide a more friendly UI, like using variable names and descriptions instead of raw variable names, http://drupal.org/project/variable

If you want to share what you're working on, you are welcome to commit to i18n cvs (just granted you permission), it doesn't matter if it's still incomplete, will be better than what we have now for D7 :-)

Jax’s picture

I still wasn't able to complete first version. Too much to do. I'll do my best to have something during this week or next Monday the latest.

Jax’s picture

Still haven't got the time to implement anything but I'm currently working on a project that has multiple domains and multiple languages and I would need something like i18n variable that integrates with the domain module. I actually want domain & language dependent variables. I'm making a not here to maybe provide support for integration with the domain module when developing the D7 version.

The i18n_variable table could get an extra column 'domain' for example.

Jose Reyero’s picture

@Jax,

I've been working on this same idea, 'realm variables' in this experimental module, http://drupal.org/project/variable

Once we have the concept worked out, we may use it for multilingual variables too.

Jose Reyero’s picture

After having some issues with cvs locks, moved the development to github, http://github.com/josereyero/i18n

There's some half upgraded i18n_variable module there.

FFFFFFFab’s picture

Hello,
I'm impatient to use D7 for my news projects but i need translation support, then i may interested to get involved for upgrade i18n project. For now i'm trying to understand the code of this module and, sorry for my stupid question, i'm wondering what are the variables you're talking about for i18nvariable.
Maybe there is another place to discuss of that and globaly the roadmap to also determine what is more judicious to work on ?

(i'm french, sorry for my approximative english...)

mgifford’s picture

Jose, was the plan for the Github site there to encourage others to clone & then merge back in the changes? Or did it just make more sense to do it there rather than having yet another project to upgrade to Git when Drupal jumps from CVS?

How do we see faster development of this piece?

robertgarrigos’s picture

Assigned: Unassigned » robertgarrigos

Looking at it at drupaldevdays

robertgarrigos’s picture

Status: Active » Needs review

As far as I can see, the i18n_variable module found in the master branch of the jose's repo at github (https://github.com/josereyero/i18n), is working for D7. You would need the required module variable_api, found in the variable project (http://drupal.org/project/variable).

Jose Reyero’s picture

Status: Needs review » Closed (fixed)

This is done.