Examples are as follows
By default, this domain name is abc.com
In French, the domain name becomes fr.abc.com
In German, the domain name becomes de.abc.com
I want to achieve such an effect how to set up and modify.
Examples are as follows
By default, this domain name is abc.com
In French, the domain name becomes fr.abc.com
In German, the domain name becomes de.abc.com
I want to achieve such an effect how to set up and modify.
Seems to me that it could be a pain to maintain.
I have two ideas about how this could be accomplished.
1) basically three "sites" are setup. The first offers the ability to go directly to one of the two other sites. Then each of those sites are located in a separate folder/area having their own database and own product. This seems pretty difficult to maintain.
2) There is basically one site, the choice of language provides the sub-domain portion of the address and then all links are generated off of the language code of the selected language (e.g. modification of includes/functions/html_output.php for the zen_href_link function to insert the language's code.) and upon reaching whatever languaged address, the code also sets the current language to the language code. So if someone visits de. then they get german, if they access by fr. then they get French.
Is there some reason to do this instead of possibly using a popup upon access to the site to select a language if no language session data has been set or selected by the visitor? Won't you be competing with yourself as far as rankings where the same product is being offered in two different languages (assuming that the product would be available in both)?
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
You didn't tell us what version you are running, but for a long time the proper code and tools for multi-linqual sites is already properly marked up.
Giving youCode:<?php // BOF hreflang for multilingual sites if (!isset($lng) || (isset($lng) && !is_object($lng))) { $lng = new language; } if (count($lng->catalog_languages) > 1) { foreach($lng->catalog_languages as $key => $value) { echo '<link rel="alternate" href="' . ($this_is_home_page ? zen_href_link(FILENAME_DEFAULT, 'language=' . $key, $request_type, false) : $canonicalLink . (strpos($canonicalLink, '?') ? '&' : '?') . 'language=' . $key) . '" hreflang="' . $key . '" />' . "\n"; } } // EOF hreflang for multilingual sites ?>
for example.Code:<link rel="alternate" href="https://www.domain.com/index.php?main_page=index&language=fr" hreflang="fr" /> <link rel="alternate" href="https://www.domain.com/index.php?main_page=index&language=de" hreflang="de" /> <link rel="alternate" href="https://www.domain.com/index.php?main_page=index&language=it" hreflang="it" /> <link rel="alternate" href="https://www.domain.com/index.php?main_page=index&language=ro" hreflang="ro" /> <link rel="alternate" href="https://www.domain.com/index.php?main_page=index&language=es" hreflang="es" />
~Melanie
PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
**I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.
Bookmarks