Purchase a license: $65

Purchases made through PayPal. Full refunds available within 30 days.

EE2 + 1.7.X compatible

Questions + support for purchased licenses: support@buildwithstructure.com

Documentation

Multi-Language Sites

Category: Techniques

The recommended method is to have your default language at the top level and make separate branches for your alternate languages like this:

/about
/services
/contact
/es/about
/es/services
/es/contact
/fr/about
/fr/services
/fr/contact

You can then use the nav_sub tag and either the start_from or exclude_status parameters. When using exclude_status you can assign statuses by language to control the output.

Example nav_sub code:


{if segment_1  'es' OR segment_1  'fr'}
	{!-- START FROM SEGMENT 2 IF NOT DEFAULT LANGUAGE --}
	{exp:structure:nav start_from='/{segment_1}/{segment_2}'}
{if:else}
	{!-- START FROM SEGMENT 1 IF DEFAULT LANGUAGE --}
	{exp:structure:nav start_from='/{segment_1}'}
{/if}

This method does not require different custom fields per language as they’re all separate pages powered by the same code and quite often the same templates.

« All Documentation