Jump to:

23377 Posts in 18296 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Language URL Prefix without translatable module

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

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

Page: 1
Go to End
Author Topic: 334 Views
  • dondon
    Avatar
    Community Member
    5 Posts

    Language URL Prefix without translatable module Link to this post

    Hi Guys,

    Ive been searching for answers on how to add a language prefix in the url but it all leads me to translatable module..I don't want to install the translatable module i just want to add a language prefix and retain the english title of the page. Below are the example url.

    http://mydomain/en/english-page-title
    http://mydomain/es/english-page-title

    Please help guys...Thanks in advance.

  • theGermaniac
    Avatar
    Community Member
    82 Posts

    Re: Language URL Prefix without translatable module Link to this post

    If you don't want to use the module, you have to create a separate site for each language. So why not put the language in the site tree to get it in the url:

    SiteTree
    - home
    - en
    - - english page
    - es
    - - spanish page

    Not nice, but works.

  • dondon
    Avatar
    Community Member
    5 Posts

    Re: Language URL Prefix without translatable module Link to this post

    Thanks theGermaniac...but the url on my first post that's just an example. I'm currently building a social networking tool for musicians just like the reverbnation.com i want all url of my site prefix with language ..its not just simple page with subpages.

    A good example is http://ap.ign.com/en

  • theGermaniac
    Avatar
    Community Member
    82 Posts

    Re: Language URL Prefix without translatable module Link to this post

    If you have pages in different languages, take the translation module. If you need a more complex way for your translations, extend the module. If you create every page independently from it's translation, make it by grouping the pages like I told you. Every page goes beneath it's language. Pages not belonging to any language create directly under root.

    Another question: If you don't use the translation module, how do you want to let the system know what page is in wich language?

    334 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.