Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

i18n / translatable: keeping the same url segment for multiple languages

Go to End



126 Posts

14 October 2011 at 4:33pm


I just updated Silverstripe to the latest version on an approximately 3 years old multilingual site. It seems that now translated pages automatically change the URLSegment to the locale code, e.g. when translated becomes .

I would much prefer to keep the URLSegment the same as the default language and solve the locale setting with a subdomain such as and that then uses a .htaccess rewrite, for example

RewriteCond %{HTTP_HOST} ^mi\.mydomain\.com
RewriteRule ^(.*) $1?locale=mi-NZ&%{QUERY_STRING}

So when I access the page
it actually opens
(the subdomain is not really important in the rewritten URL)

Any hint on how to keep URL segments same as the page in the default language would be highly appreciated.