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

stefar9477
stefar9477

Hi, I need to generate URLs using Translate plugin different for each language. For example:

/en/product/prod-en-1 /it/product/prod-it-1

and so on...

How can I create such URLs using Translate plugin? Is there any other way to achieve the same result?

Thanks

Cpt.Meatball
Cpt.Meatball

Just dumping my thoughts about this:

Using the translate plugin for your items, might be a 'bad' decision, because the different slugs (urls) for a product belong to that specific item, and not with the translation tables in the back-end settings. Apart from that it can get very messy if you have hundreds of items.

You could provide multiple slugs when entering your products in the backend. So for every language a different slug. In this way the translation logic for a certain item is held within that item.

On the front-end you could deal with the multiple languages by checking the different columns in your table depending on the currently enabled language (with a fallback to a default language).

This result doesn't involve the translate plugin,so your question isn't really answered, but maybe it helps.

1-2 of 2

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