2009-08-18, 07:17:40
Well this component automatically generates links for alternative languages out of the URL the current viewed page has.
Imagine the URL is: http://www.xyz.com/-de-test the component outputs:
Now you store your pages with the following prefix in their name:
-en-pagename for english pages
-de-pagename for german pages
-es-pagename for spanish pages
As soon as you are on one of those pages you click on the language switch to change to the related other language pages...
For sure the languages can be adapted - but those are the languages I need in my project.
Open issue: up to now the menu contains all pages in all languages - but I am sure we find a way to only show one language - by running some ereg_replace on get_navigation(return_page_slug());
Imagine the URL is: http://www.xyz.com/-de-test the component outputs:
Code:
<a href="/-en-test" title="english">en</a> |
<a href="/-de-test" title="deutsch">de</a> |
<a href="/-es-test" title="español">es</a>
Now you store your pages with the following prefix in their name:
-en-pagename for english pages
-de-pagename for german pages
-es-pagename for spanish pages
As soon as you are on one of those pages you click on the language switch to change to the related other language pages...
For sure the languages can be adapted - but those are the languages I need in my project.
Open issue: up to now the menu contains all pages in all languages - but I am sure we find a way to only show one language - by running some ereg_replace on get_navigation(return_page_slug());