diydeveloper / cms-canvas

Laravel CMS
36 stars 33 forks source link

SEO-friendly localized URLs #12

Closed aslanunal closed 5 years ago

aslanunal commented 9 years ago

Can be applied to the following URL structure for a single page in different languages?

for English: example.com/en/my-test/my-view/ for French: example.com/fr/essai/vue/

diydeveloper commented 5 years ago

To use CMS Canvas's integrated multi-lingual support, you would have to decide if you wanted your URLs to be in English or in French as you can currently only have one route per page. From there you would set up your locales as the subdomin.

For example: en.example.com/my-test/my-view fr.example.com/my-test/my-view

See https://github.com/diyphpdeveloper/cms-canvas/wiki/Multilingual-Setup

However, If you wanted it to be structured more like "example.com/fr/essai/vue/" then you could create separate content types with a route prefix.

For example you could create an "English Page" content type with a route prefix of "en" and a "French Page" with a route prefix of "fr".