Giter Site home page Giter Site logo

um-polylang's Introduction

Ultimate Member - Polylang

Integrates the Ultimate Member plugin with the Polylang plugin. Makes Ultimate Member multilingual.

Key features

  • Localized permalinks for the Account and User (profile) pages.
  • Ability to duplicate Ultimate Member forms for all languages in one click.
  • Ability to duplicate Ultimate Member pages for all languages in one click.
  • Ability to translate email templates.
  • Ability to translate bio (description) field in profile.

Installation

Note: This plugin requires the Ultimate Member and Polylang plugins to be installed first.

How to install from GitHub

Open git bash, navigate to the plugins folder and execute this command:

git clone --branch=main [email protected]:umdevelopera/um-polylang.git um-polylang

Once the plugin is cloned, enter your site admin dashboard and go to wp-admin > Plugins > Installed Plugins. Find the Ultimate Member - Polylang plugin and click the Activate link.

How to install from ZIP archive

You can install this plugin from the ZIP archive as any other plugin. Follow this instruction.

How to use

How to translate pages

Go to wp-admin > Pages to translate Ultimate Member pages. Click the Create Pages button in the notice to duplicate Ultimate Member pages for all languages. Or click the "+" icon unter the flag to duplicate each page manually.

Image - Translate pages. Pages

Go to wp-admin > Settings > Permalinks and click the Save Changes button if you need to update rewrite rules for the Account and User page permalinks. Note: The "Post name" permalink structure is recommended.

Image - Permalink settings. WP Settings, Permalink (default)

How to translate forms

Go to wp-admin > Ultimate Member > Forms to translate Ultimate Member forms. Click the Create Forms button in the notice to duplicate Ultimate Member forms for all languages. Or click the "+" icon unter the flag to duplicate each form manually.

Image - Translate forms. Forms

Once forms for languages are created you can open these forms and translate fields. You have to translate a Label for custom fields. You also can translate Placeholder and Help Text if needed.

Choices are not translatable, this is necessary for the directory search to work correctly. Don't try to translate choices in the field settings! You can use custom functions to translate choices. See examples:

UM Forms, Edit Form, Edit Field - Dropdown (use Choices Callback to translate values)+

How to translate E-mails

Go to wp-admin > Ultimate Member > Settings > Email to translate email templates. Click the "+" icon unter the flag to translate a template for the language. The plugin saves translated email templates to locale subfolders in the theme, see Email Templates.

Image - Translate emails. Email

Support

This is a free extension created for the community. The Ultimate Member team does not provide support for this extension. Open new issue if you are facing a problem or have a suggestion.

Related links

Ultimate Member home page: https://ultimatemember.com/

Ultimate Member documentation: https://docs.ultimatemember.com/

Ultimate Member on wordpress.org: https://wordpress.org/plugins/ultimate-member/

Article: How to translate plugin.

um-polylang's People

Contributors

umdevelopera avatar yuriinalivaiko avatar

Watchers

 avatar

um-polylang's Issues

Fatal Error: Class "um_ext\um_polylang\core\Fields" not found

When activating this plugin I'm getting

Fatal error: Uncaught Error: Class "um_ext\um_polylang\core\Fields" not found in [path-to-local-install]/wp-content/plugins/um-polylang-main/includes/core/class-um-polylang.php:61

Stack trace:

#0 [path-to-local-install]/wp-content/plugins/um-polylang-main/includes/core/class-um-polylang.php(46): UM_Polylang->fields()
#1 [path-to-local-install]/wp-content/plugins/um-polylang-main/includes/core/class-um-polylang.php(35): UM_Polylang->__construct()
#2 [path-to-local-install]/wp-content/plugins/ultimate-member/includes/class-init.php(153): UM_Polylang::instance()
#3 [path-to-local-install]/wp-content/plugins/um-polylang-main/um-polylang.php(78): UM->set_class('Polylang', true)
#4 [path-to-local-install]/wp-includes/class-wp-hook.php(310): um_polylang_init('')
#5 [path-to-local-install]/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)
#6 [path-to-local-install]/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#7 [path-to-local-install]/wp-settings.php(495): do_action('plugins_loaded')
#8[path-to-local-install]/wp-config.php(110): require_once('/Users/...')
#9 [path-to-local-install]/wp-load.php(50): require_once('/Users/...')
#10 [path-to-local-install]/wp-blog-header.php(13): require_once('/Users/...')
#11 [path-to-local-install]/index.php(17): require('/Users/...')
#12 {main}
  thrown in [path-to-local-install]/wp-content/plugins/um-polylang-main/includes/core/class-um-polylang.php on line 61

How to reproduce:

  • LocalWP with fresh WordPress install (PHP 8.1.9, WordPress 6.3.1, nginx, MySQL 8.0)
  • Polylang 3.4.5 (latest) with two languages installed (English + Spain)
  • Ultimate Member 2.6.11 (latest) installed (no changes to any setting, created only the login, registration, user, etc. pages with automated "Create pages" button that plugin provided)
  • Installed latest version of this plugin -> fatal error comes on activation

Polylang email language after activating account

This is a copy of the thread "Polylang email language after activating account" in the Ultimate Member support forum.
See https://wordpress.org/support/topic/polylang-email-language-after-activating-account-2/


I use Ultimate Member with Polylang. I installed the integration plugin “Ultimate Member – Polylang”. The main language is Dutch (nl_NL), and the translated language is English (en_US). I have a few problems tho:

Problem 1:

I translated the emails I use, and created a new registration and login form which I translated to English to be used on my English pages. However, some emails arent sent in English. I will show them in order here

  • Account Activation Email: Is being sent in English, so great. However, the Account Welcome Email is not being sent in English after verifying. That one is sent in Dutch. Both the Dutch and English email use this shortcode for the verifying: {account_activation_link}.
    When I verify by clicking the button, it sents me straight to the Dutch “/my-account” page aswell. I have a “/en/my-account” page for the English version, but every new registered person is being sent to “/my-account” (since both Dutch and English users are both assigned the role “Customer”);
  • Account Welcome Email: Is not being sent in English, but in Dutch;
  • Account Deleted Email: Is Is not being sent in English, but in Dutch;

Problem 2:

I also use Password Reset Email and Password Changed Email, but when I put in my email to reset the password in the password reset form, it only works on the Dutch translated page, not on the English translated page.

When I do it on the English translated page, I get no message and also no email is being sent out.

When I do it on the Dutch translated page, it works, but of course I get the emails in Dutch.

Note that I have not set Polylang to “detect browser language”. If there are translated shortcodes for {account_activation_link} that is for English or another translated language, like: {account_activation_link_en} and {account_activation_link_nl}, maybe that would solve problem 1.

Another solution might be creating different user roles per language, but I see that conflicting with other aspects of my webstore, including transactional woocommerce emails. Also, I do not know how to send translated UM emails to certain user roles.

For problem 2 I have no idea what could be happening.

Any help would be HIGHLY appreciated. I know this is a lot, but I hope we can get this working (also for other people facing this issue).

UPDATE: changing the redirect of the “Customer” role from “/my-account” to “/en/my-account” and then testing still sends me, after clicking the verify account button to the Dutch my-account page (and still sends the Account Welcome Email in Dutch)

UPDATE: I added a language dropdown in the registration progress according to this tutorial: https://docs.ultimatemember.com/article/1596-site-language-custom-field.

Unfortunately, that didn’t help. Although it changes the site language in the User profile to English (United States), after activating the account via the email button, I still get sent to the Dutch my-account page and the Welcome email is still in Dutch aswell, isntead of English (what I selected at the registration process).


The page I need help with: http://www.vestie.nl/

Fatal error after installation

Hey!

When I am installing your plugin on my Website X it causes a fatal error (see Screenshot). Do you know what causes the error?

On all my other websites your plugin works fine and is very excellent. I only get this fatal error on Website X. Any idea what went wrong here?

Best regards

Sebastian
Screenshot 1 (Fatal Error)

active crash

Hello, I hope you don't mind. This extension you've created is exactly what we need. Thank you.
However, after I installed it and tried to activate it, it prompted a crash.
My system:
wordpress:6.1.1
polylang:3.4.4
ultimate-member:2.6.8

crash log:

Fatal error: Uncaught Error: Call to a member function get_prop() on bool in /usr/local/lighthouse/softwares/wordpress/wp-content/plugins/um-polylang/includes/core/class-um-polylang.php:127
Stack trace:

#0 /usr/local/lighthouse/softwares/wordpress/wp-content/plugins/um-polylang/includes/core/class-mail.php(159): UM_Polylang->get_current() 
#1 /usr/local/lighthouse/softwares/wordpress/wp-includes/class-wp-hook.php(308): um_ext\um_polylang\core\Mail->email_table_items() 
#2 /usr/local/lighthouse/softwares/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters() 
#3 /usr/local/lighthouse/softwares/wordpress/wp-content/plugins/ultimate-member/includes/class-config.php(330): apply_filters() 
#4 /usr/local/lighthouse/softwares/wordpress/wp-content/plugins/ultimate-member/includes/class-init.php(1051): um\Config->__construct() 
#5 /usr/local/lighthouse/softwares/wordpress/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-settings.php(272): UM->config() 
#6 /usr/local/lighthouse/softwares/wordpress/wp-includes/c in /usr/local/lighthouse/softwares/wordpress/wp-content/plugins/um-polylang/includes/core/class-um-polylang.php on line 127

thank you

Fatal error

Fatal error: Uncaught Error: Class 'um_ext\um_polylang\core\Fields' not found in /home/certifie/public_html/New/wp-content/plugins/um-polylang-main/includes/core/class-um-polylang.php:61
Stack trace:

#0 /home/certifie/public_html/New/wp-content/plugins/um-polylang-main/includes/core/class-um-polylang.php(46): UM_Polylang->fields() 
#1 /home/certifie/public_html/New/wp-content/plugins/um-polylang-main/includes/core/class-um-polylang.php(35): UM_Polylang->__construct() 
#2 /home/certifie/public_html/New/wp-content/plugins/ultimate-member/includes/class-init.php(155): UM_Polylang::instance() 
#3 /home/certifie/public_html/New/wp-content/plugins/um-polylang-main/um-polylang.php(78): UM->set_class('Polylang', true) 
#4 /home/certifie/public_html/New/wp-includes/class-wp-hook.php(324): um_polylang_init('') 
#5 /home/certifie/public_html/New/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 
#6 /home/certifie/public_html/New/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 
#7 /home/certifie/public_html/New/ in /home/certifie/public_html/New/wp-content/plugins/um-polylang-main/includes/core/class-um-polylang.php on line 61

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.