Need help, quick!

General questions regarding the use of languages and encoding issues in Joomla! 1.0.x. Multi-lingual site solutions can be discussed in the child board. Translation discussions are now separate and can be found in the Working Groups Area.

Moderator: General Support Moderators

seb3dge
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Oct 29, 2007 3:30 pm

Need help, quick!

Postby seb3dge » Thu Jun 05, 2008 1:37 am

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: Select all

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: Select all

<?php echo _LANGUAGE_STRING; ?>


inside the previous one, like this:

Code: Select all

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

gydi
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Jun 21, 2009 1:50 pm
Location: Bulgaria

Re: Need help, quick!

Postby gydi » Thu Jun 25, 2009 3:37 pm

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: Select all

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: Select all

<?php echo _LANGUAGE_STRING; ?>


inside the previous one, like this:

Code: Select all

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?

User avatar
holdencreative
Joomla! Explorer
Joomla! Explorer
Posts: 469
Joined: Thu Oct 13, 2005 1:51 am
Location: Hamilton, ON
Contact:

Re: Need help, quick!

Postby holdencreative » Tue Jul 07, 2009 7:41 pm

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

gydi
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Jun 21, 2009 1:50 pm
Location: Bulgaria

Re: Need help, quick!

Postby gydi » Wed Jul 08, 2009 5:34 am

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')
{
}
...


Return to “Language - 1.0.x”

Who is online

Users browsing this forum: No registered users and 3 guests