Title: Custom hard-coded boxes translation
Last modified: August 30, 2016

---

# Custom hard-coded boxes translation

 *  [pyramisa](https://wordpress.org/support/users/pyramisa/)
 * (@pyramisa)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-hard-coded-boxes-translation/)
 * Hi guys,
 * I’ve started translating my website with the Polylang plugin, which is amazing,
   but I have the following problem:
 * On my homepage [http://pyramisaegypt.com/](http://pyramisaegypt.com/) I have 
   4 hard-coded boxes in home-page.php with the following code:
 * <div class=”four columns module-side module-side-left alpha”>
    <figure class=”
   effect-oscar”> <div class=”imgf”style=”background:url([http://pyramisaegypt.com/wp-content/uploads/fboxes2.jpg](http://pyramisaegypt.com/wp-content/uploads/fboxes2.jpg));”
   ></div> <figcaption> <h2>[Money Value Guarantee](https://wordpress.org/money-value-guarantee/?output_format=md)
   </span></h2> <p>We believe that everyone is entitled to a great vacation; we 
   have gone through great lengths to guarantee exceptional service at an exceptional
   price! </p>
 *  </figcaption>
    </figure> </div> <div class=”four columns module-side module-
   side-left alpha”> <figure class=”effect-oscar”> <div class=”imgf”style=”background:
   url([http://pyramisaegypt.com/wp-content/uploads/fboxes3.jpg](http://pyramisaegypt.com/wp-content/uploads/fboxes3.jpg));”
   ></div> <figcaption> <h2>[Our Awards & Certificates](https://wordpress.org/our-awards-certificates/?output_format=md)
   </span></h2> <p>We know hospitality and we got the awards as a testament for 
   delivering our promises.</p>
 *  </figcaption>
    </figure> </div> <div class=”four columns module-side module-
   side-left alpha”> <figure class=”effect-oscar”> <div class=”imgf” style=”background:
   url([http://pyramisaegypt.com/wp-content/uploads/fboxes4.jpg](http://pyramisaegypt.com/wp-content/uploads/fboxes4.jpg));”
   ></div> <figcaption> <h2 style=””>[Our rich history](https://wordpress.org/about-pyramisa/?output_format=md)
   </span></h2> <p>Pyramisa began as a family business in the 80’s, click here to
   learn more about how it grew to become the leading Egyptian 5-star hotel chain.
   </p>
 *  </figcaption>
    </figure> </div> </div> </div>
 * Does anyone have any idea how to translate it?
 * Thank you!
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

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

 *  Plugin Support [Chrystl](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-hard-coded-boxes-translation/#post-6845774)
 * Hi
    Did you solve your issue?
 *  Thread Starter [pyramisa](https://wordpress.org/support/users/pyramisa/)
 * (@pyramisa)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-hard-coded-boxes-translation/#post-6845868)
 * Hi,
 * Unfortunately not. I haven’t found a solution to that problem with Polylang.
 * Thanks
 *  Plugin Support [Chrystl](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-hard-coded-boxes-translation/#post-6845869)
 * > I have 4 hard-coded boxes in home-page.php
 * Is it a custom code, or is it a feature provide by your theme?
 *  Thread Starter [pyramisa](https://wordpress.org/support/users/pyramisa/)
 * (@pyramisa)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-hard-coded-boxes-translation/#post-6845879)
 * its completely custom.
 *  Plugin Support [Chrystl](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-hard-coded-boxes-translation/#post-6845880)
 * 1) You need to internationalize (I18n) your strings. Meaning that it is ready
   for translation: the strings must be wrapped by the __() function and the ‘text-
   domain’.
    To help you see: [https://developer.wordpress.org/themes/functionality/internationalization/](https://developer.wordpress.org/themes/functionality/internationalization/)
 * 2) After that you need to localize them. Meaning you will create or modify the
   po/mo files in the languages that you need.
    The Loco Translate plugin will help
   you doing this. Rescaning your theme files will make Loco Translate find the 
   strings not translated yet.
 * See: [https://developer.wordpress.org/themes/functionality/localization/](https://developer.wordpress.org/themes/functionality/localization/)
 * If you use a child theme: create a languages directory in a child theme where
   you will put your po/mo files modify or generate by Loco Translate, as for example
   wp-content/themes/mytheme-child/languages/
 *  Thread Starter [pyramisa](https://wordpress.org/support/users/pyramisa/)
 * (@pyramisa)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-hard-coded-boxes-translation/#post-6845881)
 * Thank you very much for your suggestion. I will try that.

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

The topic ‘Custom hard-coded boxes translation’ 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/)

 * 6 replies
 * 2 participants
 * Last reply from: [pyramisa](https://wordpress.org/support/users/pyramisa/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/custom-hard-coded-boxes-translation/#post-6845881)
 * Status: not resolved