Title: translate string from theme options
Last modified: August 24, 2016

---

# translate string from theme options

 *  [dados](https://wordpress.org/support/users/dados/)
 * (@dados)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/translate-string-from-theme-options/)
 * Hi,
 * I have wordpress premium theme Jkreativ.. and this theme work with WPML plugin..
   but I use polylang.. and now I have a little problem 🙂 in theme options is one
   part with footer copyright text.. and I want to this can be translated.. this
   part call this string
 * `<?php echo vp_option('joption.website_copyright', '&copy; Jegtheme 2013. All
   Rights Reserved.'); ?>`
 * is there any function to force this code to show translated string.. to register
   translated string and force it to show it here.. something like site title work…
   or tagline [http://prntscr.com/6nn522](http://prntscr.com/6nn522) .. this work
   great.. I add this part of code in theme and translate string work great…
 * `<?php echo get_bloginfo ( 'description' ); ?>`
 * can I do same thing with this custom theme string
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

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

 *  Plugin Support [Chrystl](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/translate-string-from-theme-options/#post-5962925)
 * Hello
 * You can use for example a wpml-config.xml file. See: [https://polylang.wordpress.com/documentation/documentation-for-developers/the-wpml-language-configuration-file/](https://polylang.wordpress.com/documentation/documentation-for-developers/the-wpml-language-configuration-file/)
 * Or you can use the functions [pll_register_string and pll__](https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/).
 *  Thread Starter [dados](https://wordpress.org/support/users/dados/)
 * (@dados)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/translate-string-from-theme-options/#post-5963076)
 * hmm.. yes this is okay.. but I do not want to change this part in theme, because
   this is custom code.. and on every theme update my code will be rewrite..
 *     ```
       <?php echo vp_option('joption.website_copyright', '© Jegtheme 2013. All Rights Reserved.'); ?>
       ```
   
 * so this part need to stay.. I can not use here pll_e, must be with “vp_option”
 * but I want to know is there option to register translate string with pll_register_string
   to force this part of code “vp_option…” to show translate, I do not know but 
   something like this
 *     ```
       $myvariable = vp_option('joption.website_copyright');
       pll_register_string('copy translate', $myvariable);
       ```
   
 *  Plugin Support [Chrystl](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/translate-string-from-theme-options/#post-5963080)
 * > but I do not want to change this part in theme, because this is custom code..
 * With a wpml-config.xml you don’t need to modify your theme. You just need to 
   upload it in /wp-content/polylang/ (create the directory if it does not exist).
 * To create this file you need the option name of your theme (option_name in your
   DB) and the name of your option (options_value in your DB).
 * If you have some problem to find these informations ask to your theme author 
   as its theme is compatible with WPML.
 * After create your wpml-config.xml you will find these strings in the Strings 
   translation (empty options are not displayed in the strings translation list 
   table).
 * It’s the easiest way to add your strings in Strings translations.
 *  Thread Starter [dados](https://wordpress.org/support/users/dados/)
 * (@dados)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/translate-string-from-theme-options/#post-5963098)
 * ohhh… great… thanks

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

The topic ‘translate string from theme options’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [dados](https://wordpress.org/support/users/dados/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/translate-string-from-theme-options/#post-5963098)
 * Status: not resolved