How to set up a multilanguage version

Shows some Tutorials

How to set up a multilanguage version

Postby werwi007 on Fri Jul 04, 2008 8:35 pm

I spend nearly one hour to search the forum for my issue, but I failed, hopefully you could help me with my problem.

In this case, I'm using Joomla 1.0.13. I set up the ChronoEngine form successfully. First I create a German form. In the second step I create a copy of this German form and exchange the text with English content. Now I put the new form name in the Joomfish menu and enable the English part.
And now, what happens, nothing. Instead of seeing the English content on the website, I see the German form in both states.

What can I do to use ChronoEngine with joomfish in this way?
werwi007
Fresh Boarder
 
Posts: 9
Joined: Fri Jul 04, 2008 3:49 pm

Re:How to set up a multilanguage version

Postby GreyHead on Sat Jul 05, 2008 5:21 am

Hi werwi007,

I don't know anything about Joomfish. I is though fairly simple to set up a form to respond to a user's language setting and you'll find it described at least twice in the forums here.

Bob

PS The most recent thread is here
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3176
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:How to set up a multilanguage version

Postby werwi007 on Mon Jul 07, 2008 8:18 am

Hi Bob,
Joomfish ist a powerful solution where you can set up easily a Multilanguage websites with Joomla.
What you described is not my problem, I’ll try to explain it more precisely.
1. I started with a standard Joomla 1.0.15 installation with German content
2. I set up the joomfish plugin successfully
3. I create English as a second language for the website also successfully
4. I installed Chrono Forms
5. With Chrono Forms I create a German Form which works perfectly on the German part of the website
6. Now I set up a new English Form with Chrono Forms for the English part of the website
7. I put in the new (English) Form name in the Joomfish admin panel.
8. Now, when I switch between the two languages in the website frontend nothing happens, I only see the German Form.

Where is the bug in my procedure?

http://img1.bildupload.com/5fdf2bca1167 ... a4629b.jpg[/img]
werwi007
Fresh Boarder
 
Posts: 9
Joined: Fri Jul 04, 2008 3:49 pm

Re:How to set up a multilanguage version

Postby GreyHead on Mon Jul 07, 2008 8:28 am

Hi wewi007,

As I said I don't know anything about Joomfish. Sounds like this is a problem for their suopport.

Other users have said that the approach I pointed you to works for them - notice that it only uses one form that displays different languges depending on the users language setting. It does not use two (or more) different forms.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3176
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:How to set up a multilanguage version

Postby werwi007 on Mon Jul 07, 2008 8:55 am

Hi Bob,

when I add your code in front of my "Form Code":
Code: Select all
<?php
$lang =& JFactory::getLanguage();
echo $lang->getName();?>
  case 'en':
?>
[b]english form code[/b]
<?php
  break;

  case 'ge':
  default:
?>
[b]German form code[/b]
<?php
  break;
?>


I get following error message:

Parse error: parse error, unexpected T_CASE in /var/www/web1/html/components/com_chronocontact/chronocontact.html.php(74) : eval()'d code on line 10

Where is the difficulty?
werwi007
Fresh Boarder
 
Posts: 9
Joined: Fri Jul 04, 2008 3:49 pm

Re:How to set up a multilanguage version

Postby GreyHead on Mon Jul 07, 2008 9:04 am

Hi werwi007,

Youa re missing the switch statement - see this post.

If you want to see what the user's language is set to then you can **add** the echo line - not replace the switch.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3176
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:How to set up a multilanguage version

Postby werwi007 on Mon Jul 07, 2008 9:17 am

Hi Bob,

if I add this:
Code: Select all
<?php
$lang =& JFactory::getLanguage();
switch ( $lang->getName() ) {
  case 'en':
?>
[b]english form code[/b]
<?php
  break;

  case 'de':
  default:
?>
[b]Dutch form code[/b]
<?php
  break;
}
?>
I get that:
Fatal error: Undefined class name 'jfactory' in /var/www/web1/html/components/com_chronocontact/chronocontact.html.php(74) : eval()'d code on line 2
werwi007
Fresh Boarder
 
Posts: 9
Joined: Fri Jul 04, 2008 3:49 pm

Re:How to set up a multilanguage version

Postby GreyHead on Mon Jul 07, 2008 9:38 am

Hi werwi007,

True, that's Joomla 1.5.x code and I see you are on Joomla 1.0.x. Try this:
Code: Select all
<?php
global $mosConfig_lang;
switch ( $mosConfig_lang ) {
  case 'en':
?>
  [b]english form code[/b]
<?php
  break;
 
  case 'de':
  default:
?>
  [b]German form code[/b]
<?php
  break;
}
?>
Note that 'en' and 'de' may not be the correct language codes.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3176
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:How to set up a multilanguage version

Postby werwi007 on Mon Jul 07, 2008 11:18 am

brilliant Bob, now it works.

Thanks a lot for your great and fast support.
werwi007
Fresh Boarder
 
Posts: 9
Joined: Fri Jul 04, 2008 3:49 pm

Re:How to set up a multilanguage version

Postby raimond on Tue Jul 08, 2008 1:57 pm

Can someone help me for the same issue.

I use joomla 1.5 and joomfish

german is my default language and english and dutch (and later more languages).

I have created a form "test" (german)
and "test_dutch" and "test_english"

The test for the german works great. But when i go to Joomfish --> Translations --> Menu
and translate Parameters - Basis
Form name : Test ---> to --> test_dutch (or test_english)
Nothing changed. In both other languages I'll see the German language
raimond
Fresh Boarder
 
Posts: 6
Joined: Fri May 16, 2008 1:14 pm

Re:How to set up a multilanguage version

Postby werwi007 on Tue Jul 08, 2008 2:03 pm

Don't use Joomfish for the translation, use the code which is described earlier in this post, this will work perfect.

If you are using Joomla 1.5, you have to integrate this in the "Form Code" - "Form HTML":

<?php
$lang =& JFactory::getLanguage();
switch ( $lang->getName() ) {
case 'english':
?>
here comes the English form code
<?php
break;

case 'nederlands':
default:
?>
here comes the Dutch form code
<?php
break;
}
?>
werwi007
Fresh Boarder
 
Posts: 9
Joined: Fri Jul 04, 2008 3:49 pm

Re:How to set up a multilanguage version

Postby raimond on Tue Jul 08, 2008 2:18 pm

thank you for the fast reply....but now i get everywhere "here comes the Dutch form code " in the german, dutch and english form and nothing will be translated
raimond
Fresh Boarder
 
Posts: 6
Joined: Fri May 16, 2008 1:14 pm

Re:How to set up a multilanguage version

Postby werwi007 on Tue Jul 08, 2008 2:25 pm

Try this:
1. Go to Components
2. Go to Joomfish
3. Go to Languages
4. Have a look at "Joomla! Dateiname" where you can see the language (english or german for example)
5. insert exactly this in your code (case 'language' )

now it should work
werwi007
Fresh Boarder
 
Posts: 9
Joined: Fri Jul 04, 2008 3:49 pm

Re:How to set up a multilanguage version

Postby raimond on Tue Jul 08, 2008 2:41 pm

thank you, that's a start...this must be for me
Code: Select all
<?php
$lang =& JFactory::getLanguage();
switch ( $lang->getName() ) {
case 'English (United Kingdom)':
?>
here comes the English form code
<?php
break;

case 'Nederlands (Nederland)':
default:
?>
here comes the Dutch form code
<?php
break;
}
?>


But where do i have to put the default German (Deutsch (Deutschland)) language?
raimond
Fresh Boarder
 
Posts: 6
Joined: Fri May 16, 2008 1:14 pm

Re:How to set up a multilanguage version

Postby werwi007 on Tue Jul 08, 2008 2:47 pm

Try this:

Code: Select all
<?php
$lang =& JFactory::getLanguage();
switch ( $lang->getName() ) {
case 'English':
?>
here comes the English form code
<?php
break;

case 'Nederlands':
default:
?>
here comes the Dutch form code
<?php
break;
}
?>


If Joomfish looks like this:

Imagehttp://img1.bildupload.com/1aa0d109a47c056d217b7938148ceb7c.jpg[/img]
werwi007
Fresh Boarder
 
Posts: 9
Joined: Fri Jul 04, 2008 3:49 pm

Next

Return to How To

Who is online

Users browsing this forum: Alexa [Bot], MSN [Bot], norman_kim, Yahoo [Bot] and 3 guests