The Joomla! Forum ™






Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Need help, quick!
PostPosted: Thu Jun 05, 2008 1:37 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Oct 29, 2007 3:30 pm
Posts: 1
Hello everyone!

I'm sorry for the title, but I'm really in a hurry. I need help ASAP, I've got a client waiting and I have to fix this.

I have a template from Template Plazza, it has a nice sliding tabs module, every tab has a title on it.

You can easily change the titles displayed for each tab in tptabslider.php

For example:

Code:
if ((mosCountModules( 'user24' )) || (mosCountModules( 'user25' )) || (mosCountModules( 'user26' ))) {
   
   echo "      <div class=\"panel\" title=\"TITLE\">\n";
   echo "         <div class=\"sld_wrapper\">\n";
   echo "            <div class=\"sld_inner\">\n";



Now, that works well if your site is in one language only, but I have 5 on the site I'm working on. I need a way to insert a language string in the code, to get the text from the joomla language files.

I tried placing a language string like:

Code:
<?php echo _LANGUAGE_STRING; ?>


inside the previous one, like this:

Code:
if ((mosCountModules( 'user24' )) || (mosCountModules( 'user25' )) || (mosCountModules( 'user26' ))) {
   
   echo "      <div class=\"panel\" title=\"<?php echo _LANGUAGE_STRING; ?>\">\n";
   echo "         <div class=\"sld_wrapper\">\n";
   echo "            <div class=\"sld_inner\">\n";



but obviously it didn't work. I even tried with _LANGUAGE_STRING only, but again, it didn't work.
I'm not a coder, but I understand it's not cool to call an echo inside another echo.

If someone could help me get it working, I'd be grateful!

Thanks!

Seb


Top
 Profile  
 
 Post subject: Re: Need help, quick!
PostPosted: Thu Jun 25, 2009 3:37 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jun 21, 2009 1:50 pm
Posts: 3
Location: Bulgaria
seb3dge wrote:
Hello everyone!

I'm sorry for the title, but I'm really in a hurry. I need help ASAP, I've got a client waiting and I have to fix this.

I have a template from Template Plazza, it has a nice sliding tabs module, every tab has a title on it.

You can easily change the titles displayed for each tab in tptabslider.php

For example:

Code:
if ((mosCountModules( 'user24' )) || (mosCountModules( 'user25' )) || (mosCountModules( 'user26' ))) {
   
   echo "      <div class=\"panel\" title=\"TITLE\">\n";
   echo "         <div class=\"sld_wrapper\">\n";
   echo "            <div class=\"sld_inner\">\n";



Now, that works well if your site is in one language only, but I have 5 on the site I'm working on. I need a way to insert a language string in the code, to get the text from the joomla language files.

I tried placing a language string like:

Code:
<?php echo _LANGUAGE_STRING; ?>


inside the previous one, like this:

Code:
if ((mosCountModules( 'user24' )) || (mosCountModules( 'user25' )) || (mosCountModules( 'user26' ))) {
   
   echo "      <div class=\"panel\" title=\"<?php echo _LANGUAGE_STRING; ?>\">\n";
   echo "         <div class=\"sld_wrapper\">\n";
   echo "            <div class=\"sld_inner\">\n";



but obviously it didn't work. I even tried with _LANGUAGE_STRING only, but again, it didn't work.
I'm not a coder, but I understand it's not cool to call an echo inside another echo.

If someone could help me get it working, I'd be grateful!

Thanks!

Seb


Do you find solution to multilanguage?


Top
 Profile  
 
 Post subject: Re: Need help, quick!
PostPosted: Tue Jul 07, 2009 7:41 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Thu Oct 13, 2005 1:51 am
Posts: 469
Location: Hamilton, ON
Given the limitations of the template, you may want to do a work-around.

1) Create a new Menu/Module for Each Language

2) Assign each module to a new 'position' - ie : "lang1", "lang2", etc.

3) Write a Conditional Statement in PHP to your template's index.php file. This statement will check the language being used, and then display the module position (if) the language = x

I cannot write the statement for you, but you can find some examples of this code around the net. I know it has been used to show 'login' and 'logout' menus, as a work-around, for example.

G'luck,
HC

_________________
Joomla! is an all-volunteer project. Be Kind.

Did you know that you can make almost any Joomla! site into an app? http://weeverapps.com


Top
 Profile  
 
 Post subject: Re: Need help, quick!
PostPosted: Wed Jul 08, 2009 5:34 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jun 21, 2009 1:50 pm
Posts: 3
Location: Bulgaria
JoomFish and change

tptabslider.php:

if ($mosConfig_lang=="english")
{
$titletabA = $this->params->get('titletabsliderA');
$titletabB = 'New product';
$titletabC = 'Special promo';
$titletabD = 'Special Discount';
$titletabE = 'Hot Item';
}
elseif($mosConfig_lang=="russian")
{
$titletabA = $this->params->get('titletabsliderA');
$titletabB = 'Новый продукт';
$titletabC = 'Специальные акции';
$titletabD = 'Специальные скидки';
$titletabE = 'Популярные поисковые';
}
elseif($mosConfig_lang=='german')
{
}
...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 



Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group