Skip to content

Helpers

Use these in templates or custom code:

terra_multilang_enabled() // bool
terra_languages() // ['en' => 'πŸ‡ΊπŸ‡Έ English', ...]
terra_default_language() // 'en'
terra_current_language() // 'es'
terra_language_url('en') // URL of the current page in EN
terra_get_field_in('title', 'es', $id) // force-read in a specific language
terra_multilang_switcher() // renders the <select>

get_the_date() returns localized month and day names automatically when you’re under a non-default language. Supported out of the box: es and eu. To add more languages, ask a framework dev.

Knowledge Check

Test your understanding of this section

Loading questions...