Title: Multilingual text in functions.php
Last modified: August 30, 2016

---

# Multilingual text in functions.php

 *  [oltrecomics](https://wordpress.org/support/users/oltrecomics/)
 * (@oltrecomics)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/multilingual-text-in-functionsphp/)
 * Hi,
    I’d like to translate hard coded text in functions.php file
 * This is the code in functions.php:
    [https://gist.github.com/anonymous/115f6baab37b0db5dddf](https://gist.github.com/anonymous/115f6baab37b0db5dddf)
 * I have changed the following code line:
    `<div class="box-tipo"><div class="box-
   campo">Disegni: </div><div class="box-risultato"><ul class="box-voci">`
 * with this:
    `<div class="box-tipo"><div class="box-campo"><?php echo _e( 'Disegni','
   customizr-child'); ?>:</div><div class="box-risultato"><ul class="box-voci">`
 * then in the .po english file, I added the following code line:
 *     ```
       #: customizr-child/functions.php:769
       msgid "Disegni"
       msgstr "Drawings"
       ```
   
 * Where did I go wrong?

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

 *  [Michel – xiligroup dev](https://wordpress.org/support/users/michelwppi/)
 * (@michelwppi)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/multilingual-text-in-functionsphp/#post-6521213)
 * `echo _e( 'Disegni','customizr-child');` is redundant : `_e(` is enough or use`
   echo __(`..
 * Have you compile your .po file in a .mo file ?
 *  Thread Starter [oltrecomics](https://wordpress.org/support/users/oltrecomics/)
 * (@oltrecomics)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/multilingual-text-in-functionsphp/#post-6521252)
 * Hi Michel, thanks for your help.
    So, I’ve modified .po file in the parent template,
   while functions.php is present in the child theme.
 * I honestly do not know how to create and to compile a .po file
 * Given that I understand very little of programming code, I’d like to know which
   codes I have to add, in what files and where.
 * Sorry for my bad English, I know little about this language.
 *  Thread Starter [oltrecomics](https://wordpress.org/support/users/oltrecomics/)
 * (@oltrecomics)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/multilingual-text-in-functionsphp/#post-6521351)
 * If there anyone can give me a hand?
 *  [wph4](https://wordpress.org/support/users/wph4/)
 * (@wph4)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/multilingual-text-in-functionsphp/#post-6521395)
 * Hi,
 * I am not technical but a suggestion:
    Have you tried poedit for this purpose?
 * Good luck!
 *  Thread Starter [oltrecomics](https://wordpress.org/support/users/oltrecomics/)
 * (@oltrecomics)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/multilingual-text-in-functionsphp/#post-6521403)
 * Hi wph4, thanks for your help, but…
    I would like to know: 1) if I have to create
   a new file .po in child theme and what is the code we I should put. 2) which 
   path I should put, if ilfile functiosn.php is located in child theme:
 *     ```
       #: customizr-child/functions.php:769 <---????which path
       msgid "Disegni"
       msgstr "Drawings"
       ```
   
 * 3) if I can add code line on .po file in parent theme instead child theme and
   which path I should put
 *  [Gabriel Reguly](https://wordpress.org/support/users/gabriel-reguly/)
 * (@gabriel-reguly)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/multilingual-text-in-functionsphp/#post-6521481)
 * Hi oltrecomics.
 * WordPress does not care about .po files, you must generate a .mo file 🙂
 * Poedit ([https://poedit.net/](https://poedit.net/))is the easiest way to do it,
   will allow you edit the .po file and generate a .mo file [https://developer.wordpress.org/themes/functionality/localization/](https://developer.wordpress.org/themes/functionality/localization/)
 * Also notice that your strings must be in english, if your theme is using italian
   then it is doing it wrongly.
 * The correct is to develop in english and then create the italian translation.
 * [https://codex.wordpress.org/I18n_for_WordPress_Developers](https://codex.wordpress.org/I18n_for_WordPress_Developers)
 * Ciao,
    Gabriel

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

The topic ‘Multilingual text in functions.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customizr/4.4.24/screenshot.png)
 * Customizr
 * [Support Threads](https://wordpress.org/support/theme/customizr/)
 * [Active Topics](https://wordpress.org/support/theme/customizr/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customizr/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customizr/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [Gabriel Reguly](https://wordpress.org/support/users/gabriel-reguly/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/multilingual-text-in-functionsphp/#post-6521481)
 * Status: not resolved