How the Multi Language System Works
The multi language functionality of USU5 PRO provides unique urls for every language enabled for your shop.
The default language works exactly how it did before adding multi language but all of the non default languages act differently.
From version 2.08 the URLs are generated from localized names for each product.
To explain this we'll take the example of the default language being English and two other languages, German and Spanish. Examples given below: -
- index.php
- English - www.mysite.com/index.php
- German - www.mysite.com/index.php/de
- Spanish - www.mysite.com/index.php/es
- privacy.php
- English - www.mysite.com/privacy.php
- German - www.mysite.com/privacy.php/de
- Spanish - www.mysite.com/privacy.php/es
- Product Seo Url
- English - www.mysite.com/my-great-product-p-32.html
- German - www.mysite.com/de/mein-super-produkt-p-32.html-p-32.html
- Spanish - www.mysite.com/es/mi-estupendo-producto-p-32.html
- Category Seo Url
- English - www.mysite.com/my-great-category-c-3.html
- German - www.mysite.com/de/meine-super-kategorie-c-3.html-c-3.html
- Spanish - www.mysite.com/es/my-estupenda-categoria-c-3.html
- hreflang tags
- English <link rel="alternate" hreflang="en" href="http://www.mysite.com/my-great-category-c-3.html" />
- German <link rel="alternate" hreflang="de" href="http://www.mysite.com/de/meine-super-kategorie-c-3.html" />
- Spanish <link rel="alternate" hreflang="de" href="http://www.mysite.com/es/my-estupenda-categoria-c-3.html" />
Once activated, if your site is accessed with a language based url ( e.g. www.mysite.com/es/my-gan-categoria-c-3.html ) osCommerce will be set to load the relevant language.
For the first time an osCommerce shop can be indexed seperately for its seperate languages.
New files on revision 208:
- Class for setting the different multilanguage variables:
includes\modules\ultimate_seo_urls5\includes\hreflang.php
This one is initializated in application_top just after navigation item.
- Box for changing language in columns:
includes\modules\boxes\bm_languages.php
- Navbar module for changing language:
includes\modules\navbar_modules\nb_languages.php
- Header tags module for adding alternate hreflang tags:
includes\modules\header_tags\ht_hreflang.php
- Corresponding language files:
includes\languages\%your_installed_languages%\modules\header_tags\ht_hreflang.php
You may have to create your on language files based on the ones supplied.
Sitemap and language changers should now generate correct links with description in URL taken from each one instead of using the default language.
How to Activate Multi Language Seo Capability
Admin > Configuration > Seo Urls 5
Enable multi language support? > Set to true
You Have to Upload a Languages Box and Navbar module Files
Multi language urls work differently so the old language selection box is no good. Yoou have to replace them with the ones supplied with this package.
The header tags hreflang file is already included with new uploads directory as it does not exist yet.
additional_uploads
Upload the files in the additional_uploads directory maintaining the osCommerce directory structure.
The links produced will be like index.php, index.php/de, index.php/es. At this time the links will not keep the user on the same page. ( i.e. wherever the user is in the site they will be taken to the index page on clicking a language flag )