Multilanguage 2.5 e-sport

GK User
Wed Feb 15, 2012 4:04 pm
Hi Support,

I have followed the guide https://www.gavick.com/documentation/questions/configuration-multilanguage-site-with-joomla-1-7/
Regarding configuration of multilanguage.

It works brillianty except for one little detail that I don´t understand.

”Home” is ”Home”, no matter which language is chosen. Why is it not selecting the default home-menu for the selected language?

Or maybe better explained like this:

I have two languages:
Main menu (ES) Default is Inicio
Main menu (EN) Default is Home

.. and then the default Main menu is shown no matter if ES or EN is selected.

Thanks for the help.
User avatar
Fresh Boarder

GK User
Wed Feb 15, 2012 9:05 pm
This is required by Joomla! CMS and it can be display when default language is not loaded.
User avatar
Platinum Boarder

GK User
Tue Feb 21, 2012 7:56 am
try FAlang component. it's kinda like joomfish.
User avatar
Expert Boarder

GK User
Mon Mar 05, 2012 9:34 pm
I don't get this?

I followed this guide to:
https://www.gavick.com/documentation/qu ... joomla-1-7

I get a menu like this:
Menues.png


What are the "HOME" (en) and INICIO (es) for, if now showed in selected language?

Henrik
User avatar
Expert Boarder

GK User
Mon Mar 05, 2012 9:43 pm
I want it to show "HOME" when /index.php/en/
And "INICIO" when /index.php/es
Not "Home default" :?
User avatar
Expert Boarder

GK User
Wed Mar 07, 2012 9:49 pm
Hi
I spend 5 hours more on this issue :cry:

Here are some usefull information for others trying to get a fully multi language site based on Gavick templates. The guide from Gavick below is not complete.

A greate guide for Joomla multi language sites is available here. It even has admin login so you can se how it's done back-end:
http://multilingual-joomla-demo.cloudaccess.net

This works perfect! The only problem I have is that it do not show up in Gavick template position "mainmenu" also knowen as 'Position 7' in other templates.
If I change my mainmenu-gb and mainmenu-da and set the "Modules linked to the menu" to position 'left-left' it works with Gavick Music template.

domain.net/en-gb
-Home
-Calendar

domain.net/da-dk
-Hjem
-Kalender

Perfect! The guide works!!

But why not in Gavick "mainmenu" position?

After 5 hours it hit me!

In template settings is where I set what to put in "mainmenu". From here default is Main Menu - this is now "HOME ALL" with a disabled module. Therefore no matter what, I can not load multi language menus like described on: http://multilingual-joomla-demo.cloudaccess.net

This is a BIG set back for my Gavick template! :(

In documentation it says:
Since Gavern 2.7 version we have added option to disable main menu in template. When Show template menu option is disabled the top template menu will not be visible on all pages, in this case users can use simple Menu module and place at any template module position.
https://www.gavick.com/documentation/jo ... work-menu/

:?: Where do I find this?
If I can do this, I might work something out and extend my Gavick Music template with 'Position 7' and style it almost as same. Then I think it will work.

:?: Does someone from Gavick have a point to this?

:!: Also check this:
http://community.joomla.org/blogs/commu ... odule.html
I did not get why I did not see that my site was a multi language site.
User avatar
Expert Boarder

GK User
Sat Mar 10, 2012 11:23 am
Hi
OK, I'm really trying to make a fully multi language site and FIX this "Home" menu button.
I did a new module postition 'flx_mainmenu' by following Gavick guide.

Load it with this, in: /templates/gk_music/layouts/default.php
Code: Select all
<jdoc:include type="modules" name="flx_mainmenu" style="<?php echo $this->module_styles['gk_style']; ?>" />

A working test could be seen here:
http://www.quaakin.com

It's almoste there!!

The only difference is styling.
Gavick 'mainmenu' gets 'gkmenu' on <ul> and also some 'level' class.
Code: Select all
<ul class="gkmenu level0">

My menu misses that.
:?: Any suggestion on how to load the menu like Gavick do, to get fully style ID's and Classes?
Code: Select all
<div id="gkMainMenu">
<?php
  $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
  $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
?>
</div>
User avatar
Expert Boarder

GK User
Fri Mar 16, 2012 11:24 pm
For clear situation - 'mainmenu' is not Joomla! position it is hard coded part of template and you can't use this position. If you use 'Search' option you will find many responses about this issue. Secondly, as you read on our wiki 'Since Gavern 2.7' - did you update template ? I've checked template in 2.7 version and see this in menu settings tab >>https://skitch.com/bkrztuk/8k49i/dreamweaver
User avatar
Platinum Boarder

GK User
Wed Mar 21, 2012 1:32 pm
Almost there with multilangue menu :-)
Added this:
Code: Select all
<?php if($this->getParam('show_menu', 1)) : ?>
<div id="gkMainMenu">
  <?php
   $menulang =& JFactory::getLanguage();
   $this->menu->loadMenu(('mainmenu-' . strtolower($menulang->getTag())), 'mainmenu');
   $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
  ?>
</div>

Only problem now is, that "Home" (Danish: Hjem) goes to website root URL, not /en-gb/ or /da-dk/
Will try to fix that :-)
User avatar
Expert Boarder

GK User
Wed Mar 21, 2012 2:21 pm
Now it works!! 100%
FULLY MULITILANGUAGE GAVICK MAIN MENU

1)
Follow guide: http://multilingual-joomla-demo.cloudaccess.net
I have:
mainmenu - Default Main Menu (ALL), (For module remember unpublished, only menu item "Home - ALL" language = all)
mainmenu-en-gb - Main Menu (GB), (Modul language English)
mainmenu-da-dk - Main Menu (DK), (Modul language Danish)

2)
Edit code: /templates/gk_music/layouts/default.php
Code: Select all
<div id="gkMainMenu">
<?php
 $menulang =& JFactory::getLanguage();
 $this->menu->loadMenu('mainmenu-' . strtolower($menulang->getTag()));
 $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
?>
</div>


3)
Edit code: /templates/gk_music/lib/menu/GKBase.class.php
Code: Select all
if ($v->home == 1) {
  //$v->url = JURI::base();
  // Multilangauge support URL for "Home" root
  $v->url = str_replace(array($v->route.'/', $v->route), '', JRoute::_( $v->url ));
}
User avatar
Expert Boarder

GK User
Wed Mar 21, 2012 2:46 pm
You know you can select the menu from template style. So if you followed multi-language steps and created menus for both your languages then all you had to do was duplicate current template style and assign each one of them to your chosen language and edit style settings and choose your menu depending on language.
No need to hack in to core files to be honest ; )
User avatar
Platinum Boarder

GK User
Wed Mar 21, 2012 2:56 pm
normanUK wrote:You know you can select the menu from template style. So if you followed multi-language steps and created menus for both your languages then all you had to do was duplicate current template style and assign each one of them to your chosen language and edit style settings and choose your menu depending on language.
No need to hack in to core files to be honest ; )


OH MY! :twisted:
I did not think of this option! Why did this answer first come now :-)
There are multi threaths with this quistion in here...
But anyways, thanks!
User avatar
Expert Boarder

GK User
Wed Mar 21, 2012 2:58 pm
flexsus wrote:
normanUK wrote:You know you can select the menu from template style. So if you followed multi-language steps and created menus for both your languages then all you had to do was duplicate current template style and assign each one of them to your chosen language and edit style settings and choose your menu depending on language.
No need to hack in to core files to be honest ; )


OH MY! :twisted:
I did not think of this option! Why did this answer first come now :-)
There are multi threaths with this quistion in here...
But anyways, thanks!


And then...
If you do some edits to them template, then you have to maintain it twice...
I stick with my solution
User avatar
Expert Boarder

GK User
Wed Mar 21, 2012 3:04 pm
True but also if you update your template you still have to do your edits ;) So the way i see it multi-language step comes after setting up your template style. Once i am finished with my general template styling then i can go ahead with multi-language setup which i won't be changing much in template style. Besides i can easily change font, logo etc based on language ;)

By the way i mean template style as in duplicating style from joomla admin > templates , not as in duplicating whole template folder.

See you around ;)
User avatar
Platinum Boarder

GK User
Wed Mar 21, 2012 6:23 pm
normanUK wrote:You know you can select the menu from template style. So if you followed multi-language steps and created menus for both your languages then all you had to do was duplicate current template style and assign each one of them to your chosen language and edit style settings and choose your menu depending on language.
No need to hack in to core files to be honest ; )


Can you please be more specific about this setup?

I just need to create one duplicate from Joomla interface? Music 2 for example.

Then. In each Menu I have created for each language I assign each item to the 2 different templates.
I do the same in template settings. I choose which mainmenu to use.

With this approach I have to add items to each mainmenu right in oposition to gavick guide that mentions that I should use only the mainmenu assigned to all languages?
User avatar
Junior Boarder

GK User
Wed Mar 21, 2012 9:19 pm
If you follow this guide "http://multilingual-joomla-demo.cloudaccess.net/" then what you end up with three type of menus. menu-all , menugb, menues ( Spanish for an example ).
So from now on in modules/ menus/ styles/ articles etc you have language selection of All/English US/Spanish ES.

Then you can copy and assign styles per language.
User avatar
Platinum Boarder

GK User
Mon Jan 14, 2013 3:59 am
If any code expert can help for bikestore template for the same issue.
In bike store, code I found as following:
Code: Select all
 <div id="gkMainMenu">
             <?php
                $this->mainmenu->loadMenu($this->API->get('menu_name','mainmenu'));
                 $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
             ?>   

If I cange to
Code: Select all
   <?php if($this->API->get('show_menu', 1)) : ?>
<div id="gkMainMenu">
  <?php
   $menulang =& JFactory::getLanguage();
   $this->mainmenu->loadMenu($this->API->get('mainmenu-' . strtolower($menulang->getTag())), 'mainmenu');
   $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
  ?>

I get
Warning: Missing argument 2 for GKTemplateAPI::get(), called in ../..templates/gk_bikestore/layouts/default.php on line 91 and defined in ../../templates/gk_bikestore/lib/framework/helper.api.php on line 31
Thanks in advance!
User avatar
Fresh Boarder

GK User
Mon Jan 14, 2013 6:31 am
Finally I done with
Code: Select all
           <?php if($this->API->get('show_menu', 1)) : ?>
<div id="gkMainMenu">
  <?php
   $menulang =& JFactory::getLanguage();
   $this->mainmenu->loadMenu($this->API->get('menu_name' . ($menulang->getTag()), 'mainmenu'));
   $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
  ?>
                   <div id="gkMobileMenu">
                        <?php echo JText::_('TPL_GK_LANG_MOBILE_MENU'); ?>
                        <select onChange="window.location.href=this.value;">
                        <?php
                            $this->mobilemenu->loadMenu($this->API->get('menu_name' . ($menulang->getTag()), 'mainmenu'));
                            $this->mobilemenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
                        ?>
                   </select>
                   </div>
              </div>
              <?php endif; ?>

But any one any idea to make the home page work with SH404SEF? After I enable SH404SEF, the home page come without language code, while disable it, language code come with index.php?language=xxx
Thanks!
User avatar
Fresh Boarder

GK User
Thu Jan 31, 2013 11:11 pm
i found solition. main problem gavick documents are not enough. they dont know how to explain.
you can see on my web www.myvapour.com
User avatar
Junior Boarder

GK User
Thu Feb 14, 2013 5:59 pm
stone75 wrote:i found solition. main problem gavick documents are not enough. they dont know how to explain.
you can see on my web http://www.myvapour.com


Hi,
What is your solution ? Is it style duplicate ? Is it NormanUK's solution ?
I have to built a site in 3 languages using virtuemart.
Thanks for your answer stone75
User avatar
Expert Boarder

GK User
Fri Feb 15, 2013 8:03 pm
kristobal1969 wrote:
stone75 wrote:i found solition. main problem gavick documents are not enough. they dont know how to explain.
you can see on my web http://www.myvapour.com


Hi,
What is your solution ? Is it style duplicate ? Is it NormanUK's solution ?
I have to built a site in 3 languages using virtuemart.
Thanks for your answer stone75


First create in joomla admin panel, menu manager, menues and menues items for each language you need ( example English -russian). Then go to Template manager, select e-sport template. you will see template control panel. Left side you will see "menu assigment". first for main language (example english menu) select menu and menu items. for other language menu and menu items dont select. on right side you will see menu, under thypography, choose your default language menu name (main menu EN), then save and close. do all same for other language.
User avatar
Junior Boarder

GK User
Sat Feb 16, 2013 9:45 am
Ok, let's be more precise.
could you make photos of all your menu content please ?

I can not make it work. It is a bit confusing when I read all the posts. An image is better than words. I think you have not said all about the method. For example, do you have to save the template with a new name each time ?
Thanks for your images in return. That would help everybody rapidly I think.
I already created a multilanguage site with yoothemes and it was not difficult like with gavick !
http://www.chateaudeladouve.com
User avatar
Expert Boarder

GK User
Sat Feb 16, 2013 11:06 am
Ok understood now.
I reply to my questions :
Once saved an closed for the first language menu, duplicate template and rename it for language 2.
Assign all menu items of language 2 to this template. Save and close.
Do the same for every language.
You helped me a lot stone75

Thanks
User avatar
Expert Boarder


cron