Translating Mosaic pages
Mosaic beta currently does not support translation for frontend pages, and it was not yet tested with translation plugins.
Translating admin area
Mosaic includes a Translation Builder tool that helps you create and compile translation files for the admin pages of Mosaic. It takes the base template file, mosaic.pot, and turns your translated files into the compiled .mo files WordPress needs.
You open the base template mosaic.pot in Poedit, create your translation file, and then compile it using Node.js commands.
Requirements
Before you begin, make sure you have the following installed and set up:
- Latest Node.js
Download and install from: https://nodejs.org/en/download
- Poedit (for editing translations)
Download and install from: https://poedit.net/download
- Basic command line knowledge
You should know how to handle the Command Prompt (Windows) or Terminal (Mac).
- Mosaic
You can either work directly inside your local WordPress site at: wp-content/plugins/mosaic/Languages/, or extract the Mosaic plugin installer ZIP and work inside: mosaic/Languages/.
Project structure
.
├── src/ # Source files (do not edit)
├── dist/ # Generated translation files
├── mosaic.pot # Base translation template
├── package.json
└── README.md
Usage
1. Create your translation file
- Open the mosaic/Languages/mosaic.pot file in Poedit.
- Choose “Create new translation”.
- Select your desired language (for example, Hungarian).
- Save the file with a name like: mosaic/Languages/mosaic-hu_HU.po
- Now you can translate all the text directly in Poedit. When finished, save your work, the .po file will contain your translations.
2. Open the command line
You’ll need to run the build commands inside mosaic/Languages.
On Windows:
- Click the Start menu, type cmd, and press Enter.
- Use the cd command to navigate to the Languages folder: cd [PATH-TO-WORKING_DIR]\mosaic\Languages
On Linux:
- Open Terminal (press Ctrl + Alt + T, or search for “Terminal” in your application menu).
- Use the cd command to navigate to the Languages folder: cd [PATH-TO-WORKING_DIR]/mosaic/Languages
On Linux/macOS:
- Open Terminal (you can find it via Spotlight with Cmd + Space, then type “Terminal”).
- Use the cd command to navigate to the Languages folder: cd [PATH-TO-WORKING_DIR]/mosaic/Languages
3. Install the dependencies
Once you’re inside the folder, run this command:
npm install
This will automatically download all necessary packages for the translation build process.
4. Build the translation files
After installation finishes, run:
npm run build
This command compiles all .mo translation files into the dist folder.
5. Upload your translation to the website
If you are working on a local WordPress site, you can skip to → 6. Test your translation.
If your site is hosted remotely, or you are not working directly inside your local WordPress installation, upload your compiled translation files to your server:
- Copy the contents of wp-content/plugins/mosaic/Languages/dist from your local environment
- Upload them to the same location on your site: wp-content/plugins/mosaic/Languages/dist
- Overwrite existing files if prompted.
6. Test your translation
You can test your translation by switching your site’s language:
- Go to WordPress Admin → Settings → General
- Change Site Language to the language you translated
- Save the settings and reload the page to see your translation in action
Your translation should now be active.
7. Share your translation with the community
If your translation is more than 80% complete, feel free to send it to us. With your permission, we’ll include your translation in future releases of the plugin and credit you in our documentation. You can contact us here: https://mosaicbuilder.com/support/
Do not edit anything inside the src folder. It contains internal build logic and will be replaced during updates.
Example output
After running npm run build, you’ll find the generated files in the dist/ directory.
License
This tool is distributed as part of the Mosaic project. See the main Mosaic repository for license and contribution details.