Multilang SEO Pro is the add-on to the SEO Pro extension that will allow setting up multilingual URLs with language prefixes on OpenCart 3.0.x.x and 2.3.x.x. Also, this module adds a hreflang linking to the page code to notify search engines about other language versions of the pages.
Also, the module allows you to add the same SEO URLs for different languages, while the link will differ only in the language prefix.
In the module, you can add multilingual meta tags, h1-heading and seo-description for the home page. And you can make different logos for each localization of the site.
The extension works only with SEO Pro and will not work without SEO URL and SEO Pro mode enabled in the store settings.
SEO Pro is a module for the correct work of URL links in OpenCart. For OpenCart it needs to be installed additionally. You can find SEO Pro OpenCart on the Github web service or other platforms.
Our extension is compatible with OpenCart 2.3.x.x and 3.0.x.x and PHP 5.6 - 8.x
Advantages of the Multilingual SEO Pro extension over its analogues
Speed: the extension does not load website with unnecessary requests, URL handlers and libraries, as its analogues do.
Identical SEO URLs: your URLs will differ only in the language prefixes at the beginning of the address. Of course, you can also create different SEO URLs.
Full compliance with Google's guidelines for multilingual websites: adds hreflang attributes to all pages, you can choose a localisation for x-default, multilingual pages are accessible by bots without redirects.
Ability to set different logos for different languages.
Free add-on for the language selection popup when you first visit a website
Hreflang on OpenCart
You can see the work of this module on this site, all multilingual links here are generated by SEO Pro with its help.
Example of link to home page:
https://opencart.com/ - home page in your default language
https://opencart.com/fr/ - version of the site in French
https://opencart.com/en/ - version of the site in English
Example of forming links to internal pages, for example a category:
https://opencart.com/modules/ - category page in your default language
https://opencart.com/fr/modules/ - category page in French
https://opencart.com/en/modules/ - category page in English
Features of the module Multilang SEO Pro OpenCart 3.0 & 2.3:
adds language prefixes to url
links to the main language of the site without a prefix
allows you to write the same SEO URL for different languages (add-on)
adds hreflang attributes to indicate alternate versions of pages in different languages
adds your custom URL prefixes for each language
title, description, meta tags for the home page in different languages
different logos for different languages
correct indexing of pages of different language versions
works with any languages
The prefix can contain any string, such as a short country code /en/ or /us/ or /eng/ or a language and region prefix - /en-us/ (the so-called multi-region). The hreflang code can only be an iso-2 language code or a hyphenated language and region code, such as "en" or "en-us", but never the country code as "us" or "gb".
Module installation instructions:
You must have installed the SEO Pro extension on your site. The Multilang SEO Pro is add-on for the SEO Pro extension. So you need to install and enable the SEO Pro first. You can download it from the link above.
Upload the Multilang SEO Pro in the admin panel in the "Extensions" : "Install".
Go to the "Modifications" section and update the cache.
Go to the "Extensions" : "Extensions" : "Modules" and enable the module "Multilang SEO Pro".
Edit module. Enable the status of the module, add the prefixes and hreflang and save the settings.
In the Design : SEO URL section, add blank SEO URL for the home page for each language. That is, for the path (route) common/home, the SEO URL key must be empty.
Check module operation.
Bingo!
v2.1.6 (27/03/2024) - Minor compatibility improvement with the search form
v2.1.5 (13/01/2024) - Improved compatibility with the search form on the website
v2.1.4 (11/01/2024) - Fixed an error that occurred when one of the languages was temporarily disabled
v2.1.3 (26/10/2023) - Fixed an error that occurs when the multi-language logo is enabled during checkout (Undefined variable: $server)
v2.1.2 (22/08/2023) - Fixed compatibility with ocStore 2.3.x.x. Some fixes in the extension settings form.
v2.1.1 (19/05/2023) - Added correct "canonical" for the home page
v2.1 (10/12/2022) - Added x-default selection; switch to the same SEO URLs; multilingual H1, SEO-text, meta-tags of the home page, multilingual logos.
v2.0 (12/07/2022) - Ability to manually specify a prefix for each language
When you go to search on the site, the default language is set. How to fix?
Open the file /catalog/view/javascript/common.js
Find the string: var url = $('base').attr('href') + 'index.php?route=product/search';
You need to replace it with: var url = (($('#logo a').length) ? $('#logo a').attr('href') : $('#logo').data('href')) + 'index.php?route=product/search';
Save the file.
Clear your browser cache.
How to add a new language to the site?
To add another language to OpenCart, use our instructions on the example of adding the Ukrainian language.
How to allow the same SEO URLs for different languages in Opencart 3.0?
Starting with version 2.1, this option has been added to the module settings, it is enough to enable the "Same SEO URLs" option there. Download and install add-ons: allow_same_seo_url_lang_oc3.ocmod.zip
Update caches.
Why do you need to make the same SEO URL for different languages?
It is not necessary to do this. It has no effect on SEO promotion. But this is accepted, it is so convenient, it is more understandable, because if you manually change the prefix (language code) in the URL, you will see the same page in a different language, and if you have different SEO URLs, if you change only the prefix in the URL, you will get a 404 error. This is purely aesthetics.
Error 404 when switching languages. How to fix?
You are most likely using an outdated version of SEO Pro where this issue existed. You need to update the SEO Pro module to the latest version. You can download the working version of SEO Pro from our fork on github
If you have an Nginx server - you need to adjust its config, because when the link is not clear SEO URL - the server sees that there is no folder with a prefix name in the root of the site (for example /us/) and gives a 404 error instead of allowing the site's url to be processed by the script. that is, in SEO Pro.
Solution: in the nginx config find the code: if (!-f $document_root$fastcgi_script_name) {
return 404;
}
and before it add the following code: if (!-e $request_filename) {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
The configuration file is usually called nginx.conf and is located in /usr/local/nginx/conf or /usr/local/etc/nginx or /etc/nginx or /etc/httpd/nginx.conf
Or ask the technical support of your server/host to help solve this problem, provide them with this instruction.
The prefix is duplicated on the home page, or home url contain index.php?route=... How to fix?
In the admin panel, open the Design : SEO URL section and filter the entries by the filter "Route" = "common/home".
All such entries in the Keyword field should be empty, as in the screenshot below:
If you have something written there, for example a slash "/" or a language code, you need to edit and clear the Keyword field.
Attention! The system does not allow you to create an empty SEO URL. To solve this problem, you need to install the fix allow_empty_seo_url.ocmod.zip or edit the SEO URL through the database in the "oc_seo_url" table.
In order for the system to allow adding empty SEO URLs, the option "Same SEO URLs" must be enabled in the module settings.
If you do not have records for all languages, you need to create an SEO URL record for each language, where query = "common/home" and keyword is empty value (as in the screenshot above).
After any manipulation of the SEO URL, you need to clear the system cache in order to update the cache of the SEO PRO. The SEO PRO cache is automatically reset when you save the settings of the "Multilang SEO Pro" module, so you can simply re-save the module settings.
How to make language switchers as links?
To display language switches as links, add the following code to the common/header.twig template: <ul class="list-inline">
{% for hreflang in hreflangs %}
{% if hreflang.code == code %}
<li><a class="active">{{ hreflang.code[:2]|upper }}</a></li>
{% else %}
<li><a href="{{ hreflang.href }}">{{ hreflang.code[:2]|upper }}</a></li>
{% endif %}
{% endfor %}
</ul>
If you need to change the text on the links, for example, to display the name of the language there, then you need replace {{ hreflang.code[:2]|upper }} to {{ hreflang.name }}
If you need to display links in the form of a drop-down list, transform the code as follows: <ul class="list-inline">
<li class="dropdown">
{% for hreflang in hreflangs %}
{% if hreflang.code == code %}
<a class="dropdown-toggle" data-toggle="dropdown">{{ hreflang.name }}<span class="caret"></span></a>
{% endif %}
{% endfor %}
<ul class="dropdown-menu dropdown-menu-right">
{% for hreflang in hreflangs %}
{% if hreflang.code == code %}
<li><a class="active">{{ hreflang.name }}</a></li>
{% else %}
<li><a href="{{ href }}">{{ hreflang.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
</ul>
Don't forget to refresh the modification cache and template cache after editing the template.
Why do you need to make language switches html links?
Some SEO experts advise that the page should have links to its versions in other languages. Therefore, it is advised to make the language switcher not with a js script, as implemented by default, but with html links. This is a technical point.
Is it possible to specify the localized versions of pages (hreflang) in only one way?
Language versions of pages (hreflang) can be passed in only one way (HTML Tags, HTTP Headers, Sitemap) and this should be enough for search engines to link these pages. This, in particular, is stated in the Google documentation https://developers.google.com/search/docs/advanced/crawling/localized-versions
When you send hreflang in several ways at the same time - this is not a mistake, on the contrary, because you transmit more information about the content and this should have a positive effect on promotion. Only in this case, it is necessary to ensure that the data transmitted by several methods are identical.
How to copy SEO URL from one language to another?
You can copy all SEO URL records from one language to another using the following mySQL query, which can be executed in the SQL tab of the phpmyadmin database control panel: CREATE table `temp_seo_url` AS SELECT * FROM `oc_seo_url` WHERE language_id = "1";
UPDATE `temp_seo_url` SET language_id = "2";
UPDATE `temp_seo_url` SET seo_url_id = 0;
INSERT INTO `oc_seo_url` SELECT * FROM `temp_seo_url`;
DROP TABLE `temp_seo_url`;
Here language_id = "1" is the id of the language from which we will copy, and language_id = "2" - where we will paste. Insert the id of the languages you need here.
Also, before this request, you can perform another request to remove all SEO URLs of the new language that you have already added manually: DELETE FROM `oc_seo_url` WHERE language_id = "2";
Summernote in OpenCart 3 does not have as extensive a set of formatting features as, for example, CKEditor or TinyMCE. This may be a limitation for us..
Use our tips and information on search engine documentation, then you can speed up the crawling and indexing of your site by search bots and improve i..
In today's technological world, you can't do without component parts and assemblies, and a convenient system for searching and selecting them in a vis..
This website uses cookies 🍪 to provide you with the convenience of working with its functions, based on the Privacy Policy