3

I'm new to WordPress.

I need to build a 3-page site in various languages.

If it was not multilingual I'd use slugs pages (not posts) and publish like these for example:

https://example.com/                     # Home, meta lang=en
https://example.com/recomended-books     # meta lang=en
https://example.com/do-it-yourself       # meta lang=en
https://example.com/why-it-is-great      # meta lang=en

I can do that.

But how do I achieve this?

https://example.com/                        # Language selector
https://example.com/en                      # English home, meta lang=en
https://example.com/en/recomended-books     # meta lang=en
https://example.com/en/do-it-yourself       # meta lang=en
https://example.com/en/why-it-is-great      # meta lang=en
https://example.com/es                      # Spanish home, meta lang=es
https://example.com/es/libros-recomendados  # meta lang=es
https://example.com/es/hazlo-tu-mismo       # meta lang=es
https://example.com/es/por-que-es-guay      # meta lang=es

How can I "group pages" (not posts) by language in WordPress and make them appear under a /xx/ language mini-slug?

2 Answers 2

3

This is definitely something you can achieve in WordPress.

However, you'll need a plugin like WPML or Polylang in order to achieve this.

With WPML for example you'll use the install wizard to choose your site's languages and then choose your URL format. When it comes to URL format above, use the "Different languages in directories" setting, and you're good to go.

Also, if you want English in a directory like /en/, be sure to tick the "Use directory for default language" setting.

On top of achieving your desired result, WPML or Polylang will also provide you with other benefits like setting the Hreflang tags (Important for SEO), allowing you to set up redirects and providing a language switcher widget.

Finally, here's a guide to setting up from WPML and one from Polylang.

0

Like Reagan wrote, you will need a plugin. Not all plugins are equally good. You will have to find one, which suits your content and practices. For instance, I manage a site, which has been translated by TranslatePress, and both the owner and I are not happy because it translates fragments of sentences. A sentence with a hyperreffed word in its middle is 3 sentences. But it is too late and too expensive to jump that boat. Choose carefully!

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 2, 2022 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.