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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Pretty I18N URL like example.com/en/hello


Go to End


5 Posts   2086 Views

Avatar
suntrop

Community Member, 141 Posts

16 August 2010 at 11:10pm

I want to use SS for a website that gets translated into 7 languages. This recipe has modified the URL to what I want (example.com/en/hello/ example.com/fr/salut/ example.com/de/hallo/).

But …
1. … there is no "Director::addRules(10, array" code line anymore in 2.4.1 so I can't put in the new code
2. … this will cause a lot of trouble with nested URL, right?

I do only have two choices: put the translated pages into a subfolder or into a subdomain.

Any ideas how I can get there with SS?

Avatar
oleze

Community Member, 65 Posts

18 August 2010 at 6:54am

Edited: 18/08/2010 6:59am

I would like to do that too. Should be standard within the whole CMS because it's much more SEO-friendly. Can anyone help us?

Edit: I've found a ticket for that: http://open.silverstripe.org/ticket/5909

Avatar
suntrop

Community Member, 141 Posts

18 August 2010 at 9:11pm

I've done a lot of research and tried various methods. Unfortunately theses two ones which would be fine are no longer supported in v.2.4 (cause code has changed) and the new nested URL.

At this time it seems there is no way to achieve this with SS.

Avatar
leafchild

Community Member, 41 Posts

28 June 2011 at 5:27am

Still no support for v.2.4?

Avatar
Chris_Bryer

Community Member, 35 Posts

28 June 2011 at 8:15am

hi all,
so in silverstripe 3.0, silverstripe is pulling translatable out of the core and turning it into a module which i am excited about because it means we dont have to hack the core to do certain things.

I created a module that silverstripe is looking to merge into their translatable module associate domains to specific locales. it was originally built to handle different top level domains (like .de, .fr, .jp, etc), but i modified it so it should be able to handle subdomains within one tld as well. there isnt any support for sub directories like you are looking for, but for now its something. we havent incorporated it into the translatable module yet because it needs some beta testing, and i didnt add it to silverstripe's module list because it will probably be merged into translatable in the future.

also, i included directions on how to set up multiple virtual hosts to simulate multiple domains while you are developing.

you can download the module at https://github.com/cbryer/Translatable-Domains

if you get a chance to kick the tires, please let me know how it goes, or if you have any questions.
-Chris