GithubHelp home page GithubHelp logo

mysticaltech / wp-multilang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from valexar/wp-multilang

0.0 2.0 0.0 2.37 MB

Multilingual plugin for WordPress.

JavaScript 2.57% CSS 3.05% PHP 94.38%

wp-multilang's Introduction

WP Multilang

Multilingual plugin for WordPress.

Description

WP Multilang is a multilingual plugin for WordPress.

Translations of post types, taxonomies, meta fields, options, text fields in miltimedia files, menus, titles and text field in widgets.

Features of the plugin WP Multilang:

  • 100% free.
  • Translation at PHP.
  • Compatible with REST.
  • Support configuration for translate multidimensional arrays in options, meta fields, post content.
  • Support multisite.
  • Support WordPress in sub-folder.
  • Separate menu items, posts, terms, widgets, comments per language.
  • Many filters for dynamic applying translation settings.
  • No duplicate posts, terms, menus, widgets.
  • No sub-domain for each language version.
  • No additional tables in database.
  • Possibility set many languages with one localization. For example, for localization in the region.
  • Possibility to set custom locale for html(If installed locale is en_US, you can set locale like: en, en-UK, en-AU etc. Without installation another localization)
  • Possibility for add new languages for any user with capability manage_options.
  • Exist the role "Translator" for editing posts, terms. It can not publish or delete.
  • No limits by languages or by possibilities.

WP Multilang compatible out of the box with the plugin:

  • ACF, ACF Pro
  • WooCommerce
  • WooCommerce Customizer
  • Gutenberg
  • Yoast Seo
  • Contact Form 7 (added mail tag [_language] for send user language in mail)
  • WPBakery Visual Composer
  • Page Builder by SiteOrigin
  • NextGEN Gallery
  • All in One SEO Pack
  • MailChimp for WordPress
  • Newsletter
  • Maps Builder
  • Max Mega Menu
  • MasterSlider
  • WP-PageNavi
  • BuddyPress
  • Meta Slider
  • TablePress
  • Download Monitor (Redefine templates for links in your theme and translate link texts)
  • Better Search

Supports configuration via json.

Add in the root of your theme or plugin file wpm-config.json settings.

Sample configurations can be viewed in a configuration file in the folder configs in the root plugin.

Configuration is updated after switching threads off/on or update any plugins.

The plugin has filters for dynamic application configuration for translate.

To disable translation set null into the desired configuration. For example, you must turn off translation for a post type post. There are two ways:

  1. In json. Create the root of the subject, or the roots of its plugin file wpm-config.json with:

    {
      "post_types": {
        "post": null
      }
    }
    
  2. Through the filter.
    Add in functions.php

    add_filter( 'wpm_post_post_config', '__return_null' );

To enable translation pass an empty array in php array() or empty object in json {}.

Supports translation multidimensional array of options, meta fields and post_content.
Supports the removal of established localizations.
Supports translation via GET parameter. Add in the GET parameter lang code desired language.
Supports clean database of translations when removing the plugin. Translations are only removed from the built-in tables.
Supports import term translations from qTranslate(by Soft79).
Supports automatically redirect to the user's browser language, if he visits for the first time.

Ideal for developers.

For display language switcher in any place add the code to your template if ( function_exists ( 'wpm_language_switcher' ) ) wpm_language_switcher ();
Function accepts two parameters:
$type - 'list', 'dropdown', 'select'. Default - 'list'.
$show - 'flag', 'name', 'both'. Default - 'both'.

Or using the shortcode wpm_lang_switcher. It accept two not necessary parameters 'type' and 'show'.

Available features for translation:
wpm_translate_url( $url, $language = '' ); - translate url
wpm_translate_string( $string, $language = '' ); - translate multilingual string
wpm_translate_value( $value, $language = '' ); - translate multidimensional array with multilingual strings

Update translation occurs at PHP. Therefore plugin has high adaptability, compatibility and easily integrates with other plugins. This is what distinguishes it among similar.

Available translation html tags by JS for strings what do not have WP filters before output.

Add your tags in config:

"admin_html_tags": {
    "admin_screen_id": {
      "attribute": [
        "selector"
      ]
    }
}

Where:
admin_screen_id - admin screen id.
attribute - attribute what need to translate. Available 'text' - for translate text node, 'value' - for translate form values. Or other tag attribute, like 'title', 'alt'.
selector - css selector for search needed tag. Each selector is a new array item.

If You need to add translation for multidimentional array for repeated elements You can use custom tag 'wpm_each' for set config to each element in array. Example, add config for each item 'title' in custom post field array:

"post_fields": {
    "custom_field": {
      "wpm_each": {
        "title": {}
      }
    }
}

For set translation uses the syntax:
[:en]Donec vitae orci sed dolor[:de]Cras risus ipsum faucibus ut[:]

Supports translating from syntax qTranslate, qTranslate-X, WPGlobus etc.

Compatible with REST-API.
Supports transfer the required translation through option lang in the GET request to REST.
Has the ability to keep recording the target language through the transmission parameter lang in the request.

wp-multilang's People

Contributors

geraldo avatar pedro-mendonca avatar soft79 avatar valexar avatar

Watchers

 avatar  avatar

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.