Hi NickN,
Add a line of code to echo $lang->getName() and see what values are being returned. This *should* work if you have the correct (case-sensitive) values in the cases.
Bob
Resolved!!!:woohoo:
Thank you man to point me the right way. My case was not right, echo showed me the right language. Replaced and runs like hell🙂
Great tool, time to by a license😉
Can somebody post the final code to use, following the original code and the edits, but can get it working.
Thanks
Lee
Hi Lee,
whats your joomla version ? can you show me the progress you made with the code, the steps above posted by Bob are straight forward.
cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max, my Joomla version is 1.5.7, I am working locally, since the site is still in production, I will try to upload today and pm you a link.
Thanks
Lee
you can show me the final code you made only, the one you have in the HTML box!
Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
you should try this :
<?php
$lang =& JFactory::getLanguage();
echo $lang->getName();
switch ( $lang->getName() ) {
{
case 'english':
?>
english form code
<?php
break;
case 'welsh':
default:
?>
Welsh form code
<?php
break;
}
?>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Unfortunately, I still don't see any text, can't figure it out😟
Lee
I have managed to create a bilingual form by adding the labels as <?php echo JText::_( 'LABELHERE' ) ?>, I can then go into the two language files and create to separate labels, not sure if this is a good way of doing it, but it works for me.
Thanks
Hi lw_d,
That's how the language files work in the basic Joomal 1.5 (without Joomfish) so it sounds perfect.
Bob
Thanks Bob, its a solution I really like, obviously a manual one, but that's perfect for me.
Lee
Good idea!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.