Martimiz/silverstripe-languageprefix

after change Translatable::set_default_locale from EN to LT home page not found

Closed this issue · 3 comments

after installing module I have changed default lang to LT Translatable::set_default_locale('lt_LT');
made /?flush but still on homepage with or without /lt/ page not found.

My advice would be to first install the Translatable module and see if that works correctly. I recall you have to set the default language first, before you even install the module, else the existing pages will automatically be set-up as en_US.

After that install the LanguagePrefix module. Note: if you use it out of the box, the URL would be /lt_LT/. Check out the docs on how to change that.

I found one thing that my EN home page had url /en/home and LT had /lt/home-2 , after I changed manualy EN url to /en/home-3 and LT to /lt/home everthing started to work fine. all solves that default lang home page must have home url.

To set all homepage url's to 'home' you need to, in your config.yml (See docs/enindex.md -> enable duplicate url segments):

enable_duplicate_urlsegments: true

Do a ?flush=all, then change your url segment by hand