Horje
Theme and plugin translation using Polylang for WordPress. Extension for Polylang plugin. Wordpress Tutorial

Noted That:

  • To install correctly this theme-translation-for-polylang.zip .
  • Fisrt Download the theme-translation-for-polylang.zip to your computer
  • Extract/Open theme-translation-for-polylang.zip to Your Computer.
  • Then, Find readme.txt file inside theme-translation-for-polylang.zip and Open readme.txt .
  • Now, Read the Requirements of this plugin. Which Wordpress Version and PHP Version are required to run this Plugin in Your Wordpress Site.
  • Then, Follow the Tips Below.

Start the Tips:

1. First Download " theme-translation-for-polylang.zip " Plugin to your Local Computer. (Click Download)

2. Then, Login to your " yourdomain.com/wp-admin " Dashboard.

/stack/wp/e1593231376d7d849d2-4597-4fa3-a6ff-1eca18f72aab.png

3. Then, Click on " Plugins " + " Add New " from left sidemenu of Dashboard.

/stack/wp/e1593231378Screenshot20.png

4. Now, Click on "Upload Plugin" button.

/stack/wp/e1593231380Screenshot-2019-4-2AddPluginsHorjeWordPress.png

 

5. Now, Browse " theme-translation-for-polylang.zip "  Downloaded plugin from your computer, Where you downloaded theme-translation-for-polylang.zip According to Step – 1 Above then, click on " Install Now"

/stack/wp/e15931461531577025694plugin.png

6. Now, Click on " Active Plugin"

/stack/wp/e15932313830ca45529-bf73-4101-8178-53ae60ce549f.png

7. Then, See left sidemenu. " Theme and plugin translation for Polylang (TTfP) " folder is added on left sidemenu. Now, Click on " Theme and plugin translation for Polylang (TTfP) " folder.

   Noted that: If you do not see " Theme and plugin translation for Polylang (TTfP) " folder on left sidemenu then, see at left sidemenu " Settings " or " Tools ".

8. Now you configure yourself oR Watch video tutorial below about  Theme and plugin translation for Polylang (TTfP) Configurtions and Settings or How to work " Theme and plugin translation for Polylang (TTfP) " in your WordPress site.

 

oR

After Activated Plugin According to Step-6 then,

  1. Go to " Plugins " + " Installed Plugin " from Wordpress Admin Panel Leftside Menu.
  2. or Direct go to: https://yourdomain/wp-admin/plugins.php
  3. Then, Find " Theme and plugin translation for Polylang (TTfP) " Activated Plugin from Plugin List.
  4. Then, Click on " Settings " from Plugin that is Theme and plugin translation for Polylang (TTfP)
  5. Now, Edit/Add/Config the setting and Click on " Save Changes " button,
WP Plugin Setting



Guide

This plugin requires installed and activated the Polylang plugin,
This plugin requires PHP 5.0

  1. Upload the “Theme and plugin translation for Polylang” folder to the /wp-content/plugins/ directory on your web server.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Go to the Settings -> Languages -> String translation or Languages -> String translation and find your texts.

Use



How to enable Twig extension with “Theme and plugin translation for Polylang”? [Timber plugin]

In functions.php add:


if (!class_exists('Timber')) { add_action('admin_notices', function () { echo '

Timber not activated. Make sure you activate the plugin in ' . esc_url(admin_url('plugins.php')) . '

'; }); return; } function timber_context() { $context = Timber::get_context(); $post = Timber::query_post(); $context['post'] = $post; $context['pll_e'] = TimberHelper::function_wrapper('pll_e'); $context['pll__'] = TimberHelper::function_wrapper('pll__'); return $context; } Timber::$dirname = array('templates', 'views'); // directory names with twig templates timber_context();

Next, for example in index.php add:



Then you can use in twig templates polylang functions like this (in templates/home.twig):


{% extends "base.twig" %} {% block content %} 

{{ pll_e("Test text on TWIG template 1.") }}

{{ pll__("Test text on TWIG template 2.") }}

{% endblock %}

polylang , theme , translation , using , wordpressextension , tutorial ,

Name

Read Article
https://develop.horje.com/learn/1434/reference