Route-based Translations

Learn how to internationalise URLs in your Vue app and practice yourself.

An international audience requires translated content. Localized content helps the users understand the purpose of the page or product, even more so if the URL the users see contains their preferred language. These so-called pretty URLs are an industry standard now, and adding the language to them offers an even better understanding of what content users can find behind a URL. The standard library for routing within Vue is vue-router.

We don’t use different actual languages in code examples in this lesson, but instead, we use English and a reversed version of English as substitutes. For instance, we will consider dlrow-olleh the reversed version of hello-world as its translation. Therefore, the change is visible but still understandable for everyone. The focus of this lesson is on the technical aspects, not the linguistic aspects.

Get hands-on with 1200+ tech skills courses.