Wordpress: Pre-path mode for a multilanguage solution ("/en/", "/de/") -


i need have pattern in url on whole website control language shown. pattern www.website.com/en/permalink should generate variable $lang="en".

i have tried different approaches add_rewrite_rule, add_rewrite_endpointor adding rewrite rules via add_filter('rewrite_rules_array') , using preg_matchto generate actual pattern $_server['request_uri']. had on plugins qtranslate need sourcecode complex me understand.

after all, dont understand how in way, best approach achieve this?

the language pattern has stay in url on whole page, in qtranslate, f.e. after clicking menu-link pattern has shown in url again.

the solution has seo-friendly.

if aren't confident doing this, quickest way wpml (wordpress multi-language) plug-in.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -