• Hi,

    I’m a fan of Customer Area that work perfectly for one of my client.

    For a new project I thought I could use it, but I saw on the support forum that it was not possible to use it in a multilingual context, without multisite => https://ww.wp.xz.cn/support/topic/compatibility-multilang/

    It was 2 years ago.

    I’m trying to set Customer Area on a site that use Polylang but it’s not working. Menu in other language are note displayed.

    Is there a solution?

    Thanks,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Thomas

    (@tlartaud)

    Hi,

    I don’t really know about Polylang.
    Did you try to translate the menu first?

    Regards.

    Thread Starter Cyrille Sanson

    (@css31)

    Hi,

    Yes the menu is translated, but it’s not displayed.

    Look at those two images.

    With french language selected.
    With English language selected.

    As you can see with englisn language the menu (existing in English) is not displayed and all the layer is destroyed. Have you an idea of what is doing this?

    Can your plugin be used in a multilingual environment?

    Regards,

    Plugin Contributor Thomas

    (@tlartaud)

    Hi,

    Obviously, some fixes are needed to let WP Customer Area and Polylang work together.
    The layout is destroyed, probably because :

    • the assets (skin/frontend/master/css/style.css are missing from the translated page
    • the classes customer-area or customer-area-active are missing from the body tag

    Not sure why the menu isn’t displayed. I should test that in order to be able to answer more precisely. But I’ll be honest, we currently have many updates to finish, and this will not be a priority. I can’t give any ETA about this sorry.

    Can your plugin be used in a multilingual environment?

    WP Customer Area can work fine as multilingual in a Multisite environment. You can for instance have your main site, and a sub-site for each WP Customer Area installation (and you change the main global language of each sub-site).

    We know this is not optimal, but allowing compatibility with WPML and Polylang could probably be a hard task and is not our priority for now. I hope you’ll understand 🙂

    Best regards.

    Thread Starter Cyrille Sanson

    (@css31)

    Hi,

    We understand now that Customer Area is not compatible with, at least, Polylang.

    Customer Area pages were created for all languages, nevertheless only one page by function can be declared in Customer Area Settings. This is probably the reason why the menu and functions cannot work in another language.

    I’m sorry that your wonderful plugin does not working for multilingual.

    Multisite is not an option. In this case we are close to delivering the site to our client and we cannot create a version of the site for each language.

    Cheers,

    Plugin Contributor Thomas

    (@tlartaud)

    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.
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Compatibility with polylang’ is closed to new replies.