polylang | WordPress multilingual plugin | Content Management System library

 by   polylang PHP Version: 3.4.2 License: GPL-3.0

kandi X-RAY | polylang Summary

kandi X-RAY | polylang Summary

polylang is a PHP library typically used in Web Site, Content Management System, Wordpress applications. polylang has no bugs, it has a Strong Copyleft License and it has low support. However polylang has 1 vulnerabilities. You can download it from GitHub.

WordPress multilingual plugin
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              polylang has a low active ecosystem.
              It has 303 star(s) with 99 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 62 open issues and 478 have been closed. On average issues are closed in 44 days. There are 30 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of polylang is 3.4.2

            kandi-Quality Quality

              polylang has 0 bugs and 0 code smells.

            kandi-Security Security

              polylang has 1 vulnerability issues reported (0 critical, 0 high, 1 medium, 0 low).
              polylang code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              polylang is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              polylang releases are not available. You will need to build from source code and install.
              polylang saves you 12088 person hours of effort in developing the same functionality from scratch.
              It has 24394 lines of code, 1552 functions and 254 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed polylang and discovered the below as its top functions. This is intended to give you an instant insight into polylang implemented functionality, and help decide if they suit your requirements.
            • Get calendar
            • Get the post translation url .
            • Check if the url is canonicalized .
            • Handles adding language actions .
            • Get the form field .
            • Handles a language choice .
            • Show update notification .
            • Count posts .
            • Uninstalls this module
            • Rewrite rules .
            Get all kandi verified functions for this library.

            polylang Key Features

            No Key Features are available at this moment for polylang.

            polylang Examples and Code Snippets

            No Code Snippets are available at this moment for polylang.

            Community Discussions

            QUESTION

            Change menu titles from h2 to h3 (woocommerce / wordpress)
            Asked 2021-May-20 at 00:02

            I just launched my store on wordpress and I ran into a problem: When I am on the home page of the site, all my product titles are in H2 and should be in h3 (SEO reasons), my recommendation products are also in h2 instead of h3 (on the single product page and in collections, i would like to change them all to h3). I looked for a long time where the problem could come from, searched all the files of the theme to change any title from h2 to h3 but nothing helped, I can't find where it is! I also asked the theme creators for help but they told me it was woocomerce's fault and there was nothing they could do ..

            A lot of people have had some of the same problem under other themes but they don't have the same "function.php" as me. I also followed this: How can I change the product

            in Woocommerce Storefront to ? but it didn't work for me.

            Can someone help me on this problem ?

            here is my "function.php" but i dont think it'll help..

            ...

            ANSWER

            Answered 2021-May-19 at 21:08

            I don't think the functions.php file has anything to do with it - usually HTML structures like this are created in template php files which are in the themes folder - either on the top level of that folder or as "template parts" in an according subfolder. You have to edit those( or actually those among them that are used by the pages you are referring to), changing all

            tags to (also the closing tags).

            However, since any not-selfmade theme will be updated every now and then, those changes would be overwritten with updated files when available, it would be necessary to create a child theme, which only contains those templates which you want to change (see also https://developer.wordpress.org/themes/advanced-topics/child-themes/). Then again, updated themes might contain template updates which are necessary, so you'd always have to check which details were updated in that particular template file, integrating it into your child theme templates or editing the updated original themes and using them in your child theme.

            P.S.: I think the title of your question is a bit misleading: In the question text you are asking about certain title tags in the product pages, not about parts of the menu, aren't you?

            Source https://stackoverflow.com/questions/67610449

            QUESTION

            Search and replace query with multilanguage site(polylang)
            Asked 2021-Apr-07 at 17:07

            I'm trying to update an old link for a specific language in a very big site that is based on wordpress + polylang, I'm using this query

            MYSQL

            ...

            ANSWER

            Answered 2021-Apr-07 at 17:07

            you have to be patient.. substantially the subquery returns a table not a string useful to the IN operator, so even if conceptually it is right we have to think differently. Using INNER JOIN I treat the result of the subquery as a useful table for the JOIN itself, so this is the solution for search and replace values in a db based on a wordpress polylang multilanguage site:

            MYSQL:

            Source https://stackoverflow.com/questions/66988620

            QUESTION

            Wordpress Woo Minicart plugin with Polylang problem for cart strings and cart page link for different languages
            Asked 2021-Feb-16 at 00:27

            I am trying to change the values of the strings in the Woo Minicart plugin https://wordpress.org/support/plugin/woo-minicart/ for different languages using pll_current_language() of Polylang, but I have some trouble with Polylang and the Woo Minicart plugin. I will attach a video, because the strings change for a second, then get back to the other language. Also, the different links for the different cart pages of the languages, also do not change. Here is how it looks on the frontend: https://www.youtube.com/watch?v=tYFX34ARhF0&feature=youtu.be I just want the strings and the links to be changed according the two different languages, please help. Here is the code that I put in wmc-default-fragment.php and wmc-default-template.php:

            ...

            ANSWER

            Answered 2021-Feb-16 at 00:27

            after taking a brief look at the Polylang documentation, I found out about 'pll_language_defined', which executes after all the other functions. Look at it here: https://polylang.pro/doc/developpers-how-to/

            When Polylang does load the language? There are two cases: The language is set from the content: Polylang needs to defer the language loading and does it in a function hooked to the action 'wp' action with priority 5. The language code is added to all urls (default): there is no need to defer the language loading and it is done as if Polylang were not active. Due to the first case, plugin authors should not attempt to translate strings before the 'wp' action has been fired. Polylang provides a new action 'pll_language_defined' which is fired as soon as the language is defined. It works whatever the option chosen by the user to set the language.

            I used pll_language_defined, I added an action inside it.

            Source https://stackoverflow.com/questions/66129113

            QUESTION

            Filter WooCommerce related products by Polylang language
            Asked 2021-Feb-15 at 08:48

            I'm using polylang plugin to having multi-languages website.

            Using WooCommerce with polylang demands duplicating each product for each language, so assuming I have Hebrew and English, that means 2 duplications for each products.

            It works fine with Woocommerce plugin, but when I'm displaying "related products" on the end of product page, its mixing products in English and Hebrew together.

            I expect to filter the related product by website current language (if(get_locale() == 'en_US') - to check website current locale state, else will represent Hebrew).

            Polylang functions

            Here is what I have tried, but I got stuck on the part of filtering the product by language:

            ...

            ANSWER

            Answered 2021-Feb-09 at 21:19

            You can try this code:

            Source https://stackoverflow.com/questions/66014436

            QUESTION

            Translate Woocommerce Add to cart button & Cart widget
            Asked 2021-Jan-27 at 21:27

            I have a problem with translating the Add to cart button on woocommerce.

            My website is: http://test.mk/OPA The website is in albanian and english. First language is English.

            I have installed Polylang Pro plugin and also tried with Loco translate.

            I have changed the "name" of the Add to cart button with this code in functions.php:

            ...

            ANSWER

            Answered 2021-Jan-27 at 21:27

            You can try with this function:

            Source https://stackoverflow.com/questions/65922332

            QUESTION

            Polylang custom language switcher
            Asked 2020-Nov-22 at 23:09

            How to create a custom polylang language switcher like this https://prnt.sc/vnj7b3 ? Html markup to be used : Parent :

            ...

            ANSWER

            Answered 2020-Nov-22 at 23:09

            you can get the raw data like so:

            Source https://stackoverflow.com/questions/64947821

            QUESTION

            WordPress API & Polylang: How to get categoires for specific country/language?
            Asked 2020-Oct-28 at 14:06

            My goal

            I want to be able to send a request like this https://myblog.com/wp-json/wp/v2/categories?language=4 to get only the categories that are assigned to my language with the ID 4.

            What I have tried I have already added the code mentioned by @mastababa here. So now I am able to call https://myblog.com/wp-json/wp/v2/language to get all languages defined by me via the plugin Polylang and after that I can call https://myblog.com/wp-json/wp/v2/posts?language=4 to get all posts only for the language with the ID 4.

            I am using Wordpress 5.5.1 and Polylang 2.8.3

            Thanks for your help!

            ...

            ANSWER

            Answered 2020-Oct-28 at 14:06

            I think by default you need Polylang Pro to be able to do that. See docs: https://polylang.pro/doc/rest-api/ Then you can call API like this: https://myblog.com/wp-json/wp/v2/categories?lang=en

            Source https://stackoverflow.com/questions/64571221

            QUESTION

            How to change default text in "add to basket" button in WooCommerce?
            Asked 2020-Oct-22 at 14:06

            I'm trying to change default button text "add to basket" in WooCommerce, in loop and in product page, using text field in customizer / Kirki:

            ...

            ANSWER

            Answered 2020-Oct-22 at 14:06

            Instead of "pll_e" should be "pll_", so problem solved :)

            Source https://stackoverflow.com/questions/64472988

            QUESTION

            polylang custom product attributes
            Asked 2020-Oct-04 at 14:01

            Is it possible to translate custom product attributes using Polylang Pro?

            I don't see anywhere the option to translate a custom product attribute.

            ...

            ANSWER

            Answered 2020-Oct-04 at 14:01

            The answer came from the Polylang! I need to unsychronize the Custom Product Attributes.

            The developper need to use the pllwc_copy_post_metas filter. It will allow you to uncopied and unsynchronized the product_attribute and attribute metas. Be careful because these 2 metas included custom and global attributes. That's mean the developper must target only the custom attributes inside this filter (that's required to get a fair knownledge of WooCommerce).

            The pllwc_copy_post_metas filter is documented in polylang-wc/include/product-language-cpt.php

            The developper may need to unhook the 3 actions in polylang-wc/products.php at line 30-33 to allow you to have global attributes in one language and custom product attributes in another.

            Source https://stackoverflow.com/questions/62411312

            QUESTION

            Showing active language flag
            Asked 2020-Sep-09 at 11:47

            I'm using WPML and his switcher to change the languages of the site. Everything works fine so far except the active language flag isn't changed to show the current language.

            This is the code I've written so far. It is just always showing the first flag and doesn't change it to active one.

            ...

            ANSWER

            Answered 2020-Sep-09 at 11:47

            According to WPML's official documentation, the icl_get_languages() function returns an array of languages having the following format:

            Source https://stackoverflow.com/questions/63809956

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install polylang

            You can download it from GitHub.
            PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/polylang/polylang.git

          • CLI

            gh repo clone polylang/polylang

          • sshUrl

            git@github.com:polylang/polylang.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Content Management System Libraries

            Try Top Libraries by polylang

            wpml-to-polylang

            by polylangPHP

            polylang-stubs

            by polylangPHP

            polylang-phpstan

            by polylangPHP

            dynamo

            by polylangPHP