[drupal-devel] [feature] i18n - Support for language-dependent variables

Steven drupal-devel at drupal.org
Sun Jan 30 13:56:36 UTC 2005

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     feature requests
 Priority:     normal
 Assigned to:  Jose A Reyero
 Reported by:  Jose A Reyero
 Updated by:   Steven
 Status:       patch

Not all variables contain text and not all of them should be possible to
change randomly. This whole approach to internationalisation seems a bit
backwards to me: there will always be tables with text that you haven't
translated. Shouldn't we be doing this at the string level? That's the
only thing that should be changed, no?


Previous comments:

January 24, 2005 - 01:48 : Jose A Reyero

Attachment: http://drupal.org/files/issues/i18n_language_variables_01.patch (1.16 KB)

This is a simple patch for bootstrap.inc, which adds a function call for
all the variable functions (variable_get, variable_set, variable_del).
This adds support for language-dependent variables, and does nothing
when i18n.module is disabled.
The idea is to add a language prefix to the variable name, depending on
current language, thus allowing to easily translate some variables to
different languages.


January 24, 2005 - 07:13 : chx

So simple, so useful. For example theme settings can be an i18n
variable, thus your name, mission etc can be international without any
more code.


January 24, 2005 - 20:46 : chx

Attachment: http://drupal.org/files/issues/i18n_language_variables.patch (975 bytes)

Following moshe's advice from http://drupal.org/node/16069 here is
another, more readable version.


January 24, 2005 - 20:54 : chx

Attachment: http://drupal.org/files/issues/i18n_language_variables_0.patch (1.07 KB)

:( Wrong file.


January 24, 2005 - 23:27 : chx

Forget these and stick to jose's patches. module_invoke is not available
at this point...

View: http://drupal.org/node/16071
Edit: http://drupal.org/project/comments/add/16071

More information about the drupal-devel mailing list