2009-08-16, 04:55:07
Nearly all my projects need support for 2 or more languages
My idea is to create a component offering a language switch - e.g. EN | DE
Within this component to run some regex on <?php get_page_url(); ?> exchanging the individual country shortcut within the Slug/URL- name:
xyz.com/en-test becomes xyz.com/de-test and vice-versa
Unfortunately I didn't find suitable regex (but will continue to check)
Anybody having a better / more elegant solution ?
My idea is to create a component offering a language switch - e.g. EN | DE
Within this component to run some regex on <?php get_page_url(); ?> exchanging the individual country shortcut within the Slug/URL- name:
xyz.com/en-test becomes xyz.com/de-test and vice-versa
Unfortunately I didn't find suitable regex (but will continue to check)
Anybody having a better / more elegant solution ?