vue-wordpress icon indicating copy to clipboard operation
vue-wordpress copied to clipboard

Integrating multi language support with wpml

Open michaelscheurer opened this issue 5 years ago • 1 comments

Hi @bucky355

I would like to extend the theme with multilanguage support with the help of the wpml plugin (https://wpml.org/)

Do you have any ideas, how to start? Any hints, how to achieve it?

Thanks a lot

Cheers

Michael

michaelscheurer avatar Jun 04 '19 09:06 michaelscheurer

I'm doing a project at the moment with Vue, WPML and WP Rest API.

I use this method to support translation files (json instead of .mo files) and locale switching: https://medium.com/hypefactors/add-i18n-and-manage-translations-of-a-vue-js-powered-website-73b4511ca69c

When you switch language, you can get translations with http://localhost/wp-json/wp/v2/pages?lang=en to get the English data for example and update reactive components with new data.

Maybe it helps someone.

matiyin avatar Oct 20 '19 16:10 matiyin