pixfort Theme is translation-ready, allowing you to localize your website using a child theme. This guide will walk you through the process.
Note
If you haven’t installed a child theme on your website yet, please refer to this article for guidance: How to Install the pixfort Child Theme.
Create Theme Translation Files Using Poedit
- Download and install Poedit or a similar translation tool.
- Open the
pixfort.potfile located in the/languagesdirectory of the parent pixfort Theme. - Translate the strings into your desired language.
- Save the translation as a
.pofile, naming it according to your language code (e.g.,fr_FR.pofor French). - Poedit will automatically generate a corresponding
.mofile.
Create pixfort Core Translation Files Using Poedit
In a similar way to the previous step, translate the pixfort core plugin strings as following:
- Open the
pixfort-core.potfile located in the/languagesdirectory of pixfort Core plugin. - Translate the strings into your desired language.
- Save the translation as a
.pofile, naming it according to your language code with thepixfort-core-prefix (e.g.,pixfort-core-fr_FR.pofor French). - Poedit will automatically generate a corresponding
.mofile.
Add Translation Files to the Child Theme
Place all the .po and .mo files you generated into the /languages directory in the Child Theme.
After that, and to make sure that WordPress is loading the translation files, please make sure to add the following code snippets into functions.php in your child theme (if the code snippet don’t exist):
function child_theme_slug_setup() {
load_child_theme_textdomain( 'pixfort', get_stylesheet_directory() . '/languages' );
}
add_action( 'after_setup_theme', 'child_theme_slug_setup' );
And to translate pixfort core plugin make sure that the following code snippet is also added into functions.php in your child theme:add_filter('load_textdomain_mofile', function($mofile, $domain) {
if ($domain === 'pixfort-core') {
$locale = determine_locale();
// Path to your child theme's translation file
$child_mofile = get_stylesheet_directory() . '/languages/pixfort-core-' . $locale . '.mo';
if (file_exists($child_mofile)) {
return $child_mofile;
}
}
return $mofile;
}, 10, 2);
Set the Site Language
- Navigate to your WordPress dashboard.
- Go to Settings → General.
- Under Site Language, select the language corresponding to your translation files.
- Save the changes.
Your website should now display the translated text based on the .mo file you’ve added 👍



