Skip to content

URLs

URLs get a language prefix automatically, and reading the active language is also automatic.

FunctionWithout multilangUnder /es/
get_permalink($id)https://site.com/blog/foo/https://site.com/es/blog/foo/
home_url('/about/')https://site.com/about/https://site.com/es/about/
wp_nav_menu (links)nativeprefixed with /es/

System URLs (wp-admin, REST, feeds, sitemap) are excluded automatically. The site root (/) redirects to /{default-language}/.

Knowledge Check

Test your understanding of this section

Loading questions...