WMPL – bbird.me http://bbird.me WordPress quick tips Wed, 08 Aug 2018 16:39:07 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.8 How to translate theme strings using Polylang http://bbird.me/translate-theme-strings-using-polylang/ http://bbird.me/translate-theme-strings-using-polylang/#respond Thu, 08 Sep 2016 21:13:31 +0000 http://bbird.me/?p=544 One of the powerful (or let’s say useful) functions that ship with WMPL is ICL_LANGUAGE_CODE, allowing you to translate strings using PHP

Post How to translate theme strings using Polylang je prvi puta viđen na bbird.me.

]]>
One of the powerful (or let’s say useful) functions that ship with WMPL iICL_LANGUAGE_CODE, allowing you to translate strings using PHP conditional check. This is particularly useful for translating widgets and some other theme translations.

But if you’re not inclined to purchase WMPL, but still need this feature, I only found it within Polylang plugin (when talking about free WordPress plugins). The plugin itself comes with very useful and generous function reference where you will also find the following function

pll_current_language($value);

This function returns the current language, making it useful in the following way:

<?php $currentlang = pll_current_language();
if($currentlang=="en"):?>
    <h1>ENGLISH</h1>
<?php elseif($currentlang=="ar"):?>
    <h1>ARABIC</h1>
<?php endif; ?>

This allows you to create your own conditions based on current language code, making Polylang great free alternative to WPML.

Post How to translate theme strings using Polylang je prvi puta viđen na bbird.me.

]]>
http://bbird.me/translate-theme-strings-using-polylang/feed/ 0
How to change the number of documents (items) in WPML Translation management http://bbird.me/how-to-change-the-number-of-documents-items-in-wpml-translation-management/ http://bbird.me/how-to-change-the-number-of-documents-items-in-wpml-translation-management/#respond Sat, 25 Apr 2015 19:40:44 +0000 http://bbird.me/?p=108 If you’re translating your website into another language (or languages) using WPML and have lots of of pages, posts, products,

Post How to change the number of documents (items) in WPML Translation management je prvi puta viđen na bbird.me.

]]>
If you’re translating your website into another language (or languages) using WPML and have lots of of pages, posts, products, etc., then you will likely use WPML Translation management to bulk translate multiple items at once. The current version of WPML (3.1.9.6. as of this article) provides two options – show all documents or 20 documents only. In order to change this value to something your server can handle (without getting timeouts or encountering other server issues), all you have to do is:

  1. navigate to plugins/sitepress-multilingual-cms/inc/translation-management
  2. open translation-management.class.php file
  3. in row 17, you will find the following code:

define('ICL_TM_DOCS_PER_PAGE', 20);

Needless to say, all you have to do is change 20 to any desired value.

 

Post How to change the number of documents (items) in WPML Translation management je prvi puta viđen na bbird.me.

]]>
http://bbird.me/how-to-change-the-number-of-documents-items-in-wpml-translation-management/feed/ 0