Hi

I'm trying to make the site multilanguage, and I'm lost (I'm not a webmaster obviously).
In the older gk templates such as Hotel there was the main menu module easy to set up, in GkRoyal doesn't exist

What I did so far (first part in local, second on hosted server)

  • Installed the language IT (EN alredy installed)

  • Turned on the plugins Language Filter, Code Webservice

  • Added module Language switcher (placed in the main body for now, looking to put it in the menu bar but no idea how to do that)

  • Created the template copy for each language (IT and EN) in Site template style

  • Translated all the categories, fields, modules, articles in 2 languages

  • Created all the main menus in 2 languages EN and IT
    Main menu left
    Main menu Right
    Quick Links
    About Us

So now I have

  • Main menu left ALL (default Gt Royal)
    - Home assigned ALL default site

  • Main menu left IT (template GkRoyal IT)
    - Home assigned IT default

  • Main menu Right IT

  • Quick Links IT

  • About Us IT

  • Main menu left EN (Template GkRoyal EN)
    - Home Assigned EN default

  • Main menu Right EN

  • Quick Links EN

  • About Us EN

Then I did

  • Assigned the correct language item menu for each language IT / EN

  • Assigned every content category to corrispondent menu IT / EN

  • I've been careful to select the correct language for each content, category, etc etc

  • Assigned in "Site template style - menu assignement" the language to the correct menu IT / EN

And everything fucked up, the menu disappeared, only home remain and also the layout changed ( in the settings for each menu I copied exactly each parameter in blog layout, parameter, page display, etc but something went wrong)

Plus the menu is not transparen anymore and is like a module by itself and not overlaps the header like it should be

So I decided to create a subdomain in my main site hosted and see whats happen online

Clean installation of the template from quickstart work fine despite some icons but not big deal
What i did

  • Imported via phpmyadmin the database made in localhost (everything still fucked up, even worst)

  • renamed some of the standard tables of the clean installation DB with the suffix of the localhost DB just to make simple things work and actually it did but now I'm stuck because just keep trying I'm loosing a lot of time without knowledge but only testing

Right now I have so many backups that I don't even know what I'm doing

Thank for your help

    wilhelmson Hi

    I updated this file a bit so it can load associated menu for IT & EN: /templates/gk_royal/layouts/default.php

    defaultphp.zip
    4kB

    Kindly check.

    Thank you!

    Now it works perfectly

    Still regarding the menu, can I ask you why the menu is now not overlaid like in the original template?

    It happened when I created the two IT-EN menus and I don't know how to restore the appearance of the live demo

    I thought this happened when I changed the logo, but if I go back to the original logo or with some text, it stays the same

    Thanks for your help

    It's due to the transparent class missing in template >> Features tab >> Template elements overrides >> Suffixes for pages

    The default homepage has id:101 and is assigned with class: frontpage nav-transparent, when you create new homepages for EN & IT, you need to add the same rule.

    I just added for both homepages of EN & IT for you.

    Kindly check.

    Thanks for the explanation
    It's impossible for me to figure it out on my own.

    so this could be the same reason why some translated parts of the site aren't showing up

    example the parts of the fields/fields group:
    in English front-end
    each room description/special offer has a box on the right, with information such as offer times and places to visit

    in the back end to exactly reflect all the contents I translated everything into Italian, including FIELDS/FIELDS GROUP which also contains the information boxes

    Well, those boxes don't appear in the IT front end

    see the difference in the two images

    I suppose some override rules need to apply

    However, this is far beyond my current capabilities. I think the best solution is a premium ticket, with someone mirroring the site exactly from EN to IT so I can go and see and learn what has been done.
    IT frontend

    En frontend

    to avoid part of the problem right now i've set the fields/fields group in "all" language selecting both but in this way part of the page remain in english

    catogory IT and EN

    As I can see the box is showing now on both IT & EN:

    /index.php/it/rooms-it/33-double-room-it/135-comfort-room-it
    /index.php/en/rooms/25-double-room/109-comfort-room

    is that ok now?

      saguaros

      well not really

      looks like it's working because I've setted the language in "fields" and "fields group" from english to "ALL Language" and I have unpublished the Italian ones

      in this way I can see the boxes but some parts are not tranlsated like "your price included" or "walkable places"
      I have already translated all this fields but now are unpublish because even if are published, nothing appears.

        wilhelmson HI

        You're right, in article override, it retrieves the field name in English directly - not the new field in IT so it doesn't show there.

        I will share with our dev team to update this case.

        a month later

        Hello

        There is solution for using custom fields in multilingual. Here are steps:

        1. Backup this file on your site: ROOT/templates/gk_royal/html/com_content/article/room.php . Then download this attached file >> unzip and replace above file:

          roomphp.zip
          4kB
        2. With custom fields, you will need to rename all of them. For example, with the field: walkable places, rename it to a Joomla language constant such as: TPL_CUSTOMFIELD_WALKABLE and set it to all languages:

        1. Next, go to Backend >> System >> Language Overrides and add override for TPL_CUSTOMFIELD_WALKABLE for each language, for example:

        You can apply the same for other fields.

          a month later

          saguaros
          thank you, I did it and it's working fine

          May I ask you how can I put the languages flags on the menù on top?
          I tried different thing but I'm not able to do that

          In the file: ROOT/templates/gk_royal/layouts/default.php

          I added this snippet of code to load the lang position for the language switcher module - just before the search module:

          <?php if($this->API->modules('lang')) : ?>
          <div id="gkLang" class="clearfix">
            <jdoc:include type="modules" name="lang" style="none" />
          </div>
          <?php endif; ?>

          And I assigned the language switcher module to this position.

          Kindly check.

            2 months later

            saguaros

            Hi Saguaros, been a while

            I'm slowly working on the site and I have found a couple of issues that I don't know how to solve by myself

            1. Backend: if I flag "no balcony" in the option of a room article, for example the comfort room, in the category blog of articles about rooms the balcony keep been showed in the frontend. This doesn't happend in the module section, only in category blog menu.


            1. Frontend: If I enter in a specific room, example the comfort room, where i flagged no balcony, I would like to see "no balcony" in the right black box, because otherwise it can be misunderstood

            2. Still in the comfort room article, if I put the new coordinates for the map, it doesn't change, this happend in any other articles where the map is showed through "map" box in the backend options of the article.

            3. How can I show the menu for mobile, I can see only "MENU"
              I'm searching all around but can't find a flag about mobile menu, In the others gk template I had, the desktop menu was showed automatically in mobile version.

              10 days later

              wilhelmson Backend: if I flag "no balcony" in the option of a room article, for example the comfort room, in the category blog of articles about rooms the balcony keep been showed in the frontend. This doesn't happend in the module section, only in category blog menu.

              I solved this part
              Hiding menu "rooms"
              Creating a new menu
              "suites" -> featured articles -> uncategorized articles and adding this menu to the module content "our rooms_check our best rooms" instead of the rooms category blog
              Result
              Same stuff but with right infos

              4 days later

              for the wrong balcony text in the black-box I have found in html > com_content > article > room.php this:

              <td class="articles-extrafield">
              			<?php if ($balcony): ?>
              				<div class="align-items-center">
              				<i class="royal-icon royal-icon-24 icon-route"></i>
              				<span><?php echo Text::_('TPL_BALCONY'); ?></span>
              				</div>
              			<?php endif; ?>
              </td>

              how can I make it get the info about the "NO" on balcony option for this specific room?

              I removed this part so it doesn't show info about the balcony until I get it right

              For the "map" issue:
              if you insert the new google maps coordinates and you save the article, it doesn't keep the changes but restore the old coordinates.

              I solved changing the coordinates in phpmyadmin
              "yourdatabasecode"_fields > title "Map" > Edit > enter the new coordinates in "default value" > save

              well I just discovered that the "default value" can be set in the backend area fields - map

              Ok so now:

              points 1. and 2. Balcony "no" option for some rooms is still an issue but removing the info about the balcony and using a module instead of showing a category can be considered partially solved

              1. Map issue solved changing the default value in the field area

              4.Mobile menu is not showing after the changes made for multilanguage, here I have absolutely no idea what to do.

              16 days later

              Hi @saguaros

              The website is finally online (though I'm still working on it), but I have a couple of questions:

              1. For the custom fields multilingual setup, you provided me with a new "ROOT/templates/gk_royal/html/com_content/article/room.php" file to overwrite, which allowed me to use language overrides.
                Now, I need to do the same for the "offer.php" file. I tried to compare the changes made in "room.php" to apply the same modifications, but I couldn’t figure out what exactly was changed.

              2. I also need to translate the "Your price includes" line, but nothing I’ve tried seems to work.

              Thanks!

              Ok even here I got it

              i found this

              <?php if($booknow): ?>
              							<a class="btn btn-block btn-outline" href="<?php echo $booknow; ?>" title="<?php echo $booknowlabel; ?>"><?php echo Text::_($booknowlabel); ?></a>
              						<?php endif; ?>

              php echo Text was the key, and now is working.

              But maaaan....

              Ok analizing the html I have found roomoptionlabel for Your price includes: and I have found it in the layout-rooms.php
              Adding the same stuff that you did in the room.php and worked in offer.php, I tried for roomoptionlabel changing the line everywhere with

              <label class="roomoptionlabel"><?php echo Text::_($roomoptionlabel); ?></label>

              and, without knowing what i'm doing, well it works!

              Thanks @saguaros

              Don't lock it, Im still working on it and maybe I need help

              Write a Reply...
              You need to Login to view replies.