How do I to switch a database join tables to desired language?

chattwo

New Member
Hi,
I'have a two lunguage site (english & french). I have the last SVN, to translate all the fabrik stuff I used Joomfish, all it works fine.
The probleme i have is : whene I change the site languge, the form change to the desired language but the table i have joined remain without translation.
exemple: I have created a form in french all element with database join are linked to a french tables. whene i switch the language site to english the element with database join remain linked to a french tables (witch is normal). I have create other tables in english but I dont know how to switch tables.
I have read a lot of thread but i dont find anything about this issue.
NB: the work you do guys is great i can immagine how it is helpfull.
Please help.
Many Thanks in advance.

Fabrik 2.0rc4
Joomla! 1.5.15 Stable
Php Version 5.2.9
 

Attachments

  • database join.bmp
    759.1 KB · Views: 322
Hi,
I know that Rob and Hugh are out, but if somone of the comunity ca help me I'll apprecite it.
Thx to all the stuf and the comunity.
 
An easy way to do that would be maybe to duplicate your db-join element in French and point the new one to the English table. Then use some JS magic to hide/show the correct elements.

It also depends on what you do with the data.
 
Thank you peamak for the response, i think I don't understand how to do:confused:. can you explain it to me please I'm not a programmer.
Many thanks.
 
You have to wait a little more before bumping your thread ;)

So, right away, what I'm thinking of is this (maybe there's a better solution):

Add a new field element on your table (let's call it "user_language"), hidden, eval-default-box, and in default box:

PHP:
$lg = &JFactory::getLanguage();
return $lg->get('name');

Now, copy your "french-db-join" and point this copy to your english table.

Edit "user_language" and go to the JavaScript tab and add one, onLoad > hide > french-db-join > If this != french (or maybe it returns fr-FR or something. Unhide "user_language" to see what it return exactly).
Add another one onLoad > hide "english db-join" > If this != english (or en-GB or whatever).

Does it make more sense?
 
Hi peamak,
Thank you very much, I'm so sorry for bumping my thread within 24 H.
I'll try your solution.
Thank you,
 
Thanks to Fabrik Stuff for the help, SPECIAL thanks to peamak.
Please close this thread. It's ok and works Nickel :p.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top