Translation issues in homepage

Discussion in 'One Page Pro WordPress Theme' started by georgiladakisd, May 18, 2017.

  1. georgiladakisd

    georgiladakisd New Member

    Joined:
    Jul 29, 2016
    Messages:
    14
    Likes Received:
    0
    Hi!

    I try translating my site and as you have suggested I used the polylang plugin.
    I have a front page the homepage and i created the same page in the new language according to plugin's documentation. I thouht that after that I had to find my second homepage from the scratch in my second language but I have some issues. The interface appears in the half of the screen and there is a Primary widget area option in Homepage setting instead of Homepage section sorting.

    Please explain how can I translate the homepage.

    Thank you in advance,

    Anna
     

    Attached Files:

  2. georgiladakisd

    georgiladakisd New Member

    Joined:
    Jul 29, 2016
    Messages:
    14
    Likes Received:
    0
    The only way to avoid this, is to set another homepage in the greek version of the site but then all the other parts of the page doesn't work . Moreover, they don't translate at all!!!!
     
  3. Naveen

    Naveen Guest

    Joined:
    Aug 8, 2014
    Messages:
    1,739
    Likes Received:
    64
    You can try other translating plugins like LocoTranslate.

    You won't need to create multiple copies of the pages.

    Regards!
    Naveen Kolhe
    InkThemes.com
     
  4. georgiladakisd

    georgiladakisd New Member

    Joined:
    Jul 29, 2016
    Messages:
    14
    Likes Received:
    0
    Hi Naveen!

    I am still using Polylang plugin and I am using the "pll_register_string" function to add the strings which are not found by the plugin.
    Can you please explain to me how to use the pll function in the frontend in order to translate the strings in the UI?

    Best Regards,
    Anna
     
  5. Naveen

    Naveen Guest

    Joined:
    Aug 8, 2014
    Messages:
    1,739
    Likes Received:
    64
    Hi Anna,

    pll_register_string

    The function must be called in the functions.php file of the theme. It is possible to register empty strings (for example when they come from options) but they won’t appear in the list table.
    Usage:
    Code:
    pll_register_string($name, $string, $group, $multiline);
    
    ‘$name’ => (required) name provided for sorting convenience (ex: ‘myplugin’)
    ‘$string’ => (required) the string to translate
    ‘$group’ => (optional) the group in which the string is registered, defaults to ‘polylang’
    ‘$multiline’ => (optional) if set to true, the translation text field will be multiline, defaults to false
    For more reference, please refer: https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/

    This will help you to figure it out and resolve your issue(s).

    Regards!
    Naveen Kolhe
    InkThemes.com
     

Share This Page