Title: Translating String
Last modified: November 29, 2016

---

# Translating String

 *  [livingamongnature](https://wordpress.org/support/users/livingamongnature/)
 * (@livingamongnature)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/translating-string/)
 * Hello,
    Would it be possible to translate the string ‘Read More Text’ through
   polylang?
 * Kind Regards

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Robin Cornett](https://wordpress.org/support/users/littlerchicken/)
 * (@littlerchicken)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/translating-string/#post-8495483)
 * I have never used Polylang, but looking at their documentation and some experimenting,
   I think this is something you can do with a function, if you are able to add 
   some code to your site (for example, to your functions.php file). If you do so,
   please practice safe coding, back up your files, etc. etc. Here is what I came
   up with, which seems to work in the admin, although I don’t know how to check
   an alternate language RSS feed ([source](https://polylang.pro/doc/function-reference/#pll_register_string)):
 *     ```
       add_action( 'admin_init', 'prefix_sendimagesrss_polylang' );
       /**
        * Add a string from Send Images to RSS settings to Polylang strings.
        */
       function prefix_sendimagesrss_polylang() {
       	if ( ! function_exists( 'pll_register_string' ) ) {
       		return;
       	}
       	$setting = get_option( 'sendimagesrss' );
       	pll_register_string( 'Read More Text', $setting['read_more'], 'Send Images to RSS', false );
       }
       ```
   
 * Hope that helps you get started. Good luck!
    -  This reply was modified 9 years, 6 months ago by [Robin Cornett](https://wordpress.org/support/users/littlerchicken/).
      Reason: added source link
 *  Thread Starter [livingamongnature](https://wordpress.org/support/users/livingamongnature/)
 * (@livingamongnature)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/translating-string/#post-8496479)
 * Nope, it doesn’t seem to work.
    Well it pops up in the database from polylang,
   but in my RSS feed there is no translation. By the way, I don’t need to have 
   the ‘Read more text’ translated. The actual string is what I need. Which is standard:
   Continue reading %%POSTNAME%% at %%BLOGNAME%%.
 * In the German version I would like: Mehr zu %%POSTNAME%% bei %%BLOGNAME%%.
 * I make a difference in the webfeed by.
    [http://www.livingamongnature.com/en/feed](http://www.livingamongnature.com/en/feed)
   or [http://www.livingamongnature.com/de/feed](http://www.livingamongnature.com/de/feed)
 * I hope you can help me further with this data.
 *  Plugin Author [Robin Cornett](https://wordpress.org/support/users/littlerchicken/)
 * (@littlerchicken)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/translating-string/#post-8497852)
 * So, I guess what I would try then is to just skip Polylang and modify the read
   more text directly using a filter. Here’s (untested) code that should work for
   you, but I do not know how Polylang sets up the language feeds, so the original
   conditional is just a guess on my part. Everything after that, though, should
   apply.
 *     ```
       add_filter( 'send_images_rss_excerpt_read_more', 'prefix_german_read_more', 10, 5 );
       /**
        * Change the Send Images to RSS read more text for excerpts in the German feed.
        * @param $output
        * @param $read_more
        * @param $blog_name
        * @param $post_name
        * @param $permalink
        *
        * @return string
        */
       function prefix_german_read_more( $output, $read_more, $blog_name, $post_name, $permalink ) {
       	/**
       	 * no idea what your conditional would need to be here,
       	 * but there should be a way to target the German feed separately
       	 * from the English (or other) feed.
       	 *
       	 */
       	if ( ! is_feed( 'de' ) ) {
       		return $output;
       	}
       	$output = sprintf( '<a href="%s">Mehr zu %s bei %s</a>', esc_url( $permalink ), esc_html( $post_name ), esc_html( $blog_name ) );
       	return $output;
       }
       ```
   
 * Good luck!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Translating String’ is closed to new replies.

 * ![](https://ps.w.org/send-images-rss/assets/icon-256x256.jpg?rev=976563)
 * [Send Images to RSS](https://wordpress.org/plugins/send-images-rss/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/send-images-rss/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/send-images-rss/)
 * [Active Topics](https://wordpress.org/support/plugin/send-images-rss/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/send-images-rss/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/send-images-rss/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Robin Cornett](https://wordpress.org/support/users/littlerchicken/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/translating-string/#post-8497852)
 * Status: not resolved