Hi,
I’ve added google translate meta into catalog/view/theme/pavilion/template/common/header.tpl
I wanted to add the Google translate drop down bar beside the Currency drop down (I didn’t use multi-languages inside Opencart), so I place this code before before currency slot:
However, the Google translate bar didn’t appear beside the Currency slot but it appears on top of the whole top bar as it added a new white row, which is not nice.
Could you advise on how should I edit the code to make it appear the same line as the top bar, just right beside the Currency Dropdown.
This is the code I added.
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: ‘en’, includedLanguages: ‘de,es,fr,ja,pt,ru,zh-CN’, layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, ‘google_translate_element’);
}
|
|
Hi,
I think your system removed some of my HTML code so it doesn’t look complete.
Hereby I attached the header.tpl for your reference. (Code added at Line 102-Line108)
Alternatively I tried the easier method which is adding it to the Mega Menu.
I added it to a Custom HTML dropdown and put the code there.
It can display as a drop down menu but when I try to select languages from the Google Translate Dropdown, the menu close it again, making it impossible to select any language.
|
|
Hi,
Please, use a zip archive to attach files here in the support forums.
Thanks,
ThemeBurn team
|
|
I’ve sent the file to your email.
Have you receive it? Please at least reply if you do.
|
|
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
|
|
Hi,
This is the exact same thing I told you in my first post.
If I insert in the 1st line you mention, it will appear as the attached file, auto line break after currency.
If I insert in the 2nd line you mention, it will make up a whole new white bar on top of the top menu, which is worse.
Actually I tried insert it in the Mega Menu while waiting 15 days for your answer, it can display but when I try to select language in the drop down, the whole menu will disappear, so it’s not a good solution.
|
|
Hi,
As we’ve said, you will need some custom styling to position the language switcher. We’ve made it for you; just add these styles from the Pavilion CP > Theme Settings > Custom > Custom Stylesheet text field:
#google_translate_element, #google_translate_element > div {
display: inline-block;
vertical-align: top;
}
#google_translate_element > div > div {
padding: 0;
border: none;
}
Be sure you’ve inserted the code for the switcher as we’ve pointed in our previous post. We say this, because the header, you’ve send on our email had the switcher code out of the currency slot.
BR,
ThemeBurn team
|
|
Hi, I’ve done as you have instructed.
However, kindly see the attached image, the Google Translate bar still takes up the whole row.
Possible to make it the same row with the currency exchange?
And, I can’t see the Select Language text as it is in White Color, thought it was override by the CSS on the top.
I try to style .goog-te-menu-value and .goog-te-gadget-simple .goog-te-menu-value span but to no avail.
By the way can you take a look at this support issue, it’s been pending for very long:
http://support.themeburn.com/topic/tb_themes-make-currency-display-error
|
|
Hi,
Can we take a look at the live website?
Thanks,
ThemeBurn team
|
|
Hi,
I moved the Google translate to footer instead.
However, I try to style the text color but it keeps get override by some CSS somewhere else which I’m not sure where. I’ve used !important in Custom CSS slot but to no avail.
Nevermind figured it out myself.
-
This reply was modified 3321 days ago by xsaintzx.
-
This reply was modified 3321 days ago by TB Support.
-
This reply was modified 3318 days ago by TB Support.
|
|
OK. Will mark the topic as “resolved” then.
BR,
ThemeBurn team
|
|