Mobile app version of vmapp.org
Login or Join
Jessie594

: Use a single global domain with language subdirectories and language specific URL slugs for Wordpress internationalization We're looking to internationalize a WordPress website, and for multiple reasons

@Jessie594

Posted in: #Internationalization #Localization #Seo #Wordpress

We're looking to internationalize a WordPress website, and for multiple reasons have decided to go with the subdirectories with global top level domain option:


example.com/de/
example.com/it/
example.com/es/
etc


However, we would like the URL slugs to be in the local language, aiming to improve click through rates of local searchers. So that would be,


example.com/this-is-a-page
example.com/fr/c-est-une-page
example.com/es/esta-es-una-página
example.com/gr/auti-einai-mia-selida


Is it possible to do this on WordPress? Do you know any such setup examples?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

No plugin required

This can easily be done without a plugin and by using WP page templates


Copy header.php to header-spanish.php
Copy footer.php to footer-spanish.php
Copy page.php to page-spanish.php


Edit page-spanish.php


Change get_header(); to get_header('spanish);
Change get_footer(); to get_footer('spanish');
Remove all information within /* */ and add /* Template Name: Spanish Pages */
Edit a page then on the right side look for "template" which is under attributes, then change the page template to Spanish Pages


Now you have a unique header and footer which will give you more control over your different languages.



What about Hreflang Plugins?

You could however use a hreflang manager however this simply controls the <head> but if you want full control then having template pages is the way to go, espeically if you want different sidebars, footers and headers to match the langure of the page.



3 Methods to rewrite URLs with country speific codes e.g /es/


Add a blank page called es with permalink /es/, then make the page noindex, then on your pages that are spanish, simply use parent es which will add the country code to the URL.
Use a rewrite plugin.
Use the WordPress Rewrite API

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme