Skip to main content
update with an example
Source Link
angoru
  • 519
  • 2
  • 6

Why don't you declare your variables inside a module with the variable module. Then you could use and translated them.

I suggest you read this: http://www.lullabot.com/blog/article/module-monday-variable

I don't think there is a way of having things translated in drupal without using the database, so i give you a simple option of using variable module as the only way.

you can add in your module.info file, so it will work as you enable your module.

/**
 * Implements hook_install().
 */
function mymo_install() {

  // save the translation of your variable
  variable_store_set('language', 'es', 'site_name', 'Este es mi Sitio', TRUE);

}

you could delete things with hook_uninstall if you want.

hope i don't get extra -1, it helped!could be useful to someone else...

Why don't you declare your variables inside a module with the variable module. Then you could use and translated them.

I suggest you read this: http://www.lullabot.com/blog/article/module-monday-variable

hope it helped!

Why don't you declare your variables inside a module with the variable module. Then you could use and translated them.

I suggest you read this: http://www.lullabot.com/blog/article/module-monday-variable

I don't think there is a way of having things translated in drupal without using the database, so i give you a simple option of using variable module as the only way.

you can add in your module.info file, so it will work as you enable your module.

/**
 * Implements hook_install().
 */
function mymo_install() {

  // save the translation of your variable
  variable_store_set('language', 'es', 'site_name', 'Este es mi Sitio', TRUE);

}

you could delete things with hook_uninstall if you want.

hope i don't get extra -1, it could be useful to someone else...

Source Link
angoru
  • 519
  • 2
  • 6

Why don't you declare your variables inside a module with the variable module. Then you could use and translated them.

I suggest you read this: http://www.lullabot.com/blog/article/module-monday-variable

hope it helped!