This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

emzero439
emzero439

What would be the best approach to do a localized site?

I mean to have a default site in english and a few others languages (/es, /fr) for example. Of course avoiding as much code duplication as possible.

Thanks

eeinblack377
eeinblack377

There's a couple ways to do this -

You can create a field in each post's database entry that states what context/language its a part of, so it only shows up on that context, otherwise 404's. This would mean extending the content class and adding that field to the initial migration. You can probably use custom routes that pull data depending on the context in the database.

Good luck!

This is actually something on my components-i-need-to-make list - But dont wait for me!

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.