Skip to content

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

Notifications You must be signed in to change notification settings

umdevelopera/um-polylang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ultimate Member - Polylang

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

Key features

  • Language switcher shortcode. Display the Polylang language switcher where you need it.
  • Adds rewrite rules for localized Account and User (profile) pages.
  • Localize links for Ultimate Member pages in menu.
  • Ability to duplicate Ultimate Member pages for all languages in one click.
  • Ability to duplicate Ultimate Member forms for all languages in one click.
  • Ability to translate email templates.
  • Ability to translate bio (description) field in profile.
  • Integration with the Account tabs extension. Makes custom account tabs translatable.
  • Integration with the Profile tabs extension. Makes custom profile tabs translatable.

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 git@github.com: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 display language switcher

Add the [um_pll_switcher] shortcode to the place you need.

Shortcode attributes:

  • int dropdown Displays languages into a dropdown if set to 1. Defaults to 0.
  • int show_flags Displays flags if set to 1. Defaults to 1.
  • int show_names Shows language names if set to 1. Defaults to 1.
  • string display_names_as Whether to display the language name or its slug. Accepts 'slug' and 'name'. Defaults to 'name'.
  • string item_display Whether to display languages as a list or inline. Accepts 'list-item' and 'inline'. Defaults to 'inline'.
  • string item_spacing Whether to preserve or discard whitespace between list items. Accepts 'preserve' and 'discard'. Defaults to 'preserve'.
  • int hide_current Hides the current language if set to 1. Defaults to 0.
  • int hide_if_no_translation Hides the link if there is no translation if set to 1. Defaults to 0.

See also Options

Screenshots

Image - Language switcher shortcode in the header template. Language switcher shortcode in the header template

Image - Language switcher in the page header. Language switcher in the page header

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. WP Pages cr

Go to wp-admin > Settings > Permalinks if you need to update rewrite rules for the Account and User page permalinks. Don't change settings on this page, just visit it. WordPress will update rewrite rules. 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. UM Forms cr

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.

Note: Choices in the Checkbox, Radio, Dropdown and Multi-Select fields are not translatable. This is necessary for the directory filters to work correctly. Don't try to translate choices in the field settings! You can use custom functions to translate choices. See examples here:

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. UM Settings, Email cr

How to translate custom account tabs

This feature is available if you use the Account tabs extension.

Go to wp-admin > Ultimate Member > Account Tabs. Click the Create Tabs button in the notice to duplicate tabs for all languages. Once the tabs are duplicated for each language, you can manually edit the tab title.

Image - Translate account tabs. WP, Ultimate Member, Account Tabs (Create Tabs) cr

How to translate custom profile tabs

This feature is available if you use the Profile tabs extension.

Go to wp-admin > Ultimate Member > Profile Tabs. Click the Create Tabs button in the notice to duplicate tabs for all languages. Once the tabs are duplicated for each language, you can manually edit the tab title.

Image - Translate profile tabs. WP, Ultimate Member, ProfileTabs (Create Tabs) cr

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.

Please give a star if you think this extension is useful. I wish to know how many people use it. Thanks.

Useful links

Ultimate Member documentation

Ultimate Member core plugin info and download

Free extensions for Ultimate Member

Code snippets for Ultimate Member

About

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

Topics

Resources

Stars

Watchers

Forks

Languages