Jump to content


Photo
- - - - -

Translate "Load More Posts" Postpin section button

translation PHP Postpin apostrophe

  • Please log in to reply
3 replies to this topic

#1 Jean-Philippe

Jean-Philippe

    Super Member

  • Members

  • 116 posts
  • LocationTokyo
  • Country: Country Flag

Posted 27 September 2012 - 12:41 PM

Hello everyone,

I would like to translate the "Load More Posts" Postpin section button into French with the following words: "Afficher plus d'articles".
I identify the PHP file to edit (...wp-content/plugins/pagelines-sections/pagelines-postpins/section.php) and the two lines I have to modify:
  • jQuery('.fetchpins a').removeClass('loading').text('<?php _e('Load More Posts', 'pagelines');?>');
  • $next_url = sprintf('<div class="%s fetchlink" %s><a class="btn" href="%s">%s</a></div>', $class, $display, $u, __('Load More Posts', 'pagelines'));
The problem is there is an apostrophe in "Afficher plus d'articles" and of course I need to convert this apostrophe into text. Then I try to insert a backslash just before the apostrophe like this: "Afficher plus d\'articles". That way the button displays the French words I want but the Postpin section doesn't work anymore.

For sure I miss something. Any help please?

#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 27 September 2012 - 11:30 PM

You can edit using po and mo files.
See this for additional answers:

Please Login or Register to see this Hidden Content


  • Jean-Philippe likes this

#3 Jean-Philippe

Jean-Philippe

    Super Member

  • Members

  • 116 posts
  • LocationTokyo
  • Country: Country Flag

Posted 28 September 2012 - 03:21 PM

Thank you for your answer.
How can I close this topic now?

#4 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 28 September 2012 - 03:24 PM

You don't need to close this topic. We can just let it be. :)





Also tagged with one or more of these keywords: translation, PHP, Postpin, apostrophe