Hi,
Customer Area pages were created for all languages, nevertheless only one page by function can be declared in Customer Area Settings.
You are completely right! This is one of the missing features that should be deployed in order to make WPCA and Polylang compatible. However, we’ve checked that, and there are also a lot of other issues that should be addressed to let it work.
We, unfortunately, don’t have an out-of-box solution for now, sorry.
However, were you trying to use Polylang to translate EACH content (creating duplicated content)? Or were you trying to use Polylang to translate the interface?
Most people are misunderstanding why Polylang should be used. Polylang should be used to translate contents, not the interface. It actually allows you to create duplicated posts, for each language. Most of the time, people don’t want duplicated and translatable posts, they just want the interface showing up in the correct language, depending on a user’s selection.
In this case, this should be doable with a bit of custom development.
As you can see in our code (plugins/customer-area/src/php/core-classes/plugin.class.php, line 189), we have some filters that you can use to let the users change the language of the interface:
$locale = function_exists('get_user_locale') ? get_user_locale() : get_locale();
// Traditional WordPress plugin locale filter
$locale = apply_filters('plugin_locale', $locale, $domain);
You can actually change a language for a user by editing its profile from the wp-admin.
Or, from that plugin_locale filter, you can easily change the language of the interface for a given user.
For instance, you could use ACF and our ACF Integration add-on to create a new language field for your frontend user’s profiles, and then, simply add a function, bound to plugin_locale filter, in order to let them change the language of the interface.
I hope that helps.
Regards.
-
This reply was modified 4 years, 9 months ago by
Thomas.