Needs work
Project:
Service links
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2011 at 06:30 UTC
Updated:
21 Dec 2011 at 20:00 UTC
Hi,
Thanks for the great module. I would very much appreciate if you could make the variables on the site multilingual. So I can show dutch service links on the dutch version and English links on the English version.
Thanks
Mark
Comments
Comment #1
TheCrow commentedIf you mean phptemplate variables, you have some examples on template.php, you can mix these info using the API service_link_render_some(), passing as first param the list of dutch services... and so on
otherwise could you give more details? :)
Comment #2
splash112 commentedHi TheCrow,
No meant something more like this:
Variables in a hook_init like this can be set differently for every language. Now just copied all, which might be overkill... I think "service_links_show" should be a good one to start, then a user can select for every language which links to show.
Comment #3
TheCrow commentedthis is the same that define an hook_locale?
Comment #4
splash112 commentedNo, as far as I understand hook_locale does something with strings...
The above code makes the variables, which can hold anything, multilingual. Which means they can have a different version for every active language in ones site.
One of the variables here holds the information on which service links are enabled. When one makes that variable multilingual, one can select German service links for when the site is in German mode and English service links for when the site is in English mode.
Nothing will change when the site is just in 1 language or when nobody changes the settings in other languages.
Comment #5
TheCrow commentedThank you very much for the explaination, i'll add this on the next commit :)
Comment #6
gdl commentedThere aren't any code changes necessary to support i18n_variables, and I don't believe there's anything keeping one from setting any of the service_links variables as multilingual variables right now.
The i18n_variable documentation for the Drupal 6 version of the i18n collection of modules describes how to do make any variable an i18_variable on a per-site basis by altering the settings.php file for a given site and then setting the desired variables for each language.
Best,
-G