admin管理员组文章数量:1125497
Now when I’m on an internal page of the italian version if I select “deutsch” I land to the home page in german. Is it possible landing to the same internal page in german? my website:test.sacconicase In wp-config.php I have
define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
all German internal page slugs are the same as Italian page slugs. I wonder if I have to change this code in functions.php:
add_filter('locale', 'lang_by_subdomain');
function lang_by_subdomain( $lang ) {
if (0 === strpos( $_SERVER['HTTP_HOST'], 'de.')) {
// set to German
return 'de_DE';
} else {
// return original language
return $lang;
}
}
本文标签: phphow switching from italian to german from internal to internal URL
版权声明:本文标题:php - how switching from italian to german from internal to internal URL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736668321a1946783.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论