I'd like to change language through url so my site can appear in different languages in search engines.
e.g: I'd like the user to change language through a link like this:
www.mysite.com/lang=ar
I'm using opencart 3.0.2
Currently the user change through a form menu that submit post request, so search engine can't index the other languages.
How can I do that?
I successfully applied these steps:
1- open catalog/controller/startup/startup.php
after the line:
add the following code:
2- added the following lines to .htaccess file:
3- added languages flags to the template file:
Now when I navigate to www.mysite.com/en it will go to English language and this is true for other languages, and now search engine can index other languages pages.