Title: Translating theme options from an array
Last modified: August 20, 2016

---

# Translating theme options from an array

 *  [bufny](https://wordpress.org/support/users/bufny/)
 * (@bufny)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/translating-theme-options-from-an-array/)
 * My theme has some options, something like this:
 *     ```
       a:2:{
           s:4:"logo";s:31:"http://www.example.com/logo.jpg";
           s:14:"carouselslides";a:2: {
               i:0;a:4: {
                   s:3:"img";s:28:"http://www.example.com/1.jpg";
                   s:4:"link";s:29:"http://www.example.com/1.html";
                   s:5:"title";s:8:"Title #1";
                   s:7:"content";s:0:"";
               }
               i:1;a:4: {
                   s:3:"img";s:28:"http://www.example.com/2.jpg";
                   s:4:"link";s:29:"http://www.example.com/2.html";
                   s:5:"title";s:8:"Title #2";
                   s:7:"content";s:0:"";
               }
           }
       }
       ```
   
 * I have successfully registered the “logo” for translation by calling pll_register_string(‘
   my theme’, $options[“logo”]), but I’m not sure how to call the pll_register_string(
   if possible) for translating img, link and title attributes from the carouselslides
   array.
 * [http://wordpress.org/extend/plugins/polylang/](http://wordpress.org/extend/plugins/polylang/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/translating-theme-options-from-an-array/#post-3375339)
 * I would expect something like this to work:
 *     ```
       foreach ($options['carouselslides'] as $slide) {
       	pll_register_string($slide['img']);
       	pll_register_string($slide['link]);
       	pll_register_string($slide['title']);
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Translating theme options from an array’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/translating-theme-options-from-an-array/#post-3375339)
 * Status: not resolved