# How to Translate The Theme

> Translate the Phox theme with PO/MO files: edit translations, compile the MO file, and set the default language of WordPress.

Source: https://phox.wdes.org/docs/how-to-translate-theme/
Last updated: 2020-05-29

There are cases when we need to change the default texts of Phox across the front end of the website. Our subjects use the capabilities of the WordPress text field, so there is no need to change any core files to achieve this goal. To accomplish this, you need to know a few points.

## Overview

- [Translate Theme – PO/MO files](https://phox.wdes.org/docs/how-to-translate-theme/#theme)
- [Setting The Default Language of WordPress](https://phox.wdes.org/docs/how-to-translate-theme/#default)

### Translate Theme – PO/MO files

WordPress uses 2 file pair with PO and MO extensions to understand where to put alternative texts inside code. PO file is a Key/Value pair file which will be used to add translations of specific phrases. MO file is compiled version of PO file which WordPress understands.

Phox also have their own PO/MO file pair that you can use to translate different parts of the theme. Those files are located in **wp-content/themes/phox/languages** folder.

![Screenshot](https://phox.wdes.org/docs/assets/crop-0-0-822-198-0-Screen-Shot-2020-05-30-at-12.52.16-AM.DDf8ymQi_1B1fc9.webp)

#### How to edit PO files and Compile MO file out of it

You will need a software called POEDIT to edit PO files and add your translations inside that and generate MO file out of it. For more information please read [this article](https://codex.wordpress.org/Translating_WordPress) in details:

- Set Default Language. 
- Install the Child Theme.  
- Copy Languages Folder.  

Go to **wp-content/themes/phox/languages** and copy folder and paste it into your child theme **wp-content/themes/phox-child** So that you will have a folder on your child theme called languages:

You will see 2 files there that you can use for translation (en.mo and en.po). Please consider that the name of these 2 files should be the same as your default language code which you have set in wp-config.php file

- Use Loco Translate.

The Loco Translate is a third party plugin which makes it possible to edit the PO files and compile them to MO files directly from the WordPress Admin section. [Click here](https://phox.wdes.org/docs/translate-theme-words-by-the-loco-translate-plugin/) for more detailed information on how to use the plugin for the theme translation.

### Setting Default Language of WordPress

Go to Settings > General > Default Language to see the option.

![default language](https://phox.wdes.org/docs/assets/crop-0-0-891-598-0-default_language.B9tEA3IX_1zkap4.webp)
