Translating Text in Site Stacker
This guide will walk you through the process of translating text within the Site Stacker platform. Site Stacker utilizes a system based on gettext technology, using .po and .mo files to manage translations for different parts of the system.
Understanding the Basics
- .po files: These are the files you will directly edit. They contain the original text and the corresponding translations.
- .mo files: These are compiled versions of .po files that Site Stacker uses to display the translations. You won't edit these directly; the system handles their creation.
- Translation Templates (.pot files): These are the master files containing all the text strings available for translation for a specific part of the system. You'll use these as a starting point.
Step 1: Getting Your Translation Files
Your first step is to download the necessary template files.
- Navigate to Languages: From your Site Stacker admin dashboard, find and open the Languages component.
- Access Template Management: At the top of the Languages screen, click the Manage Template Languages button.
- Download Templates: You'll see a grid display. Here you have two options:
- All Templates: Click the Download Locale Template Files button. This will download a .zip file containing all available locale templates.
- Please Note: Downloading all locale templates can take a few minutes as it's a long-running request.
Step 2: Editing the Translation Files
Once you have downloaded the .pot (template) or existing .po files, it's time to add your translations.
- Recommended Tool: For the smoothest experience, we suggest using dedicated translation editors like Poedit (https://poedit.net). Poedit is designed to work with .po files and simplifies the translation process.
- Using a Text Editor: If you choose to use a standard text editor (like Notepad or TextEdit), it's critical that you save the file in UTF-8 format. Saving in other formats can lead to errors and display issues.
Important Language Code Formatting:
When working with languages, always use the correct two-part language codes. This applies to the site channel or languages component.
- Correct Examples: en_us (English - United States), es_co (Spanish - Colombia), fr_ca (French - Canada)
- Incorrect Examples: en (too general), eng (incorrect format)
Step 3: Uploading Your Translated Files
After you've finished editing and saving your translations in the .po file:
- Return to Template Management: Go back to the Manage Template Languages screen within the Languages component.
- Use the Upload Toolbar: Look for the toolbar at the top of the screen and select Upload Language File.
- Upload Details: When uploading your .po file, you will need to specify:
- Target Template: Select the template to which this translation applies (e.g., "Events," "User Profiles").
- Choose File: Select your language file to upload from your computer.
Crucial File Naming Convention: Site Stacker relies on specific file names to correctly apply translations. The name of your uploaded .po file must match the system's expected name for that component or template.
- Example: If you are translating text for the Contributions component, your translated file must be named contributions.po.
- Important: Files with names that Site Stacker doesn't recognize (e.g., my_translations.po, testing.po) will be ignored and will not have any effect on the site's content.
Step 4: Making Revisions and Updates
If you need to make changes or add more translations later:
- Re-download: You can always download your previously uploaded .po files from the same grid in the Manage Template Languages screen.
- Edit: Make your necessary changes using Poedit or your UTF-8 compatible text editor.
- Re-upload: Follow the same upload process outlined in Step 3 to submit your updated file.
By following these steps, you can effectively manage and update translations across your Site Stacker platform. If you encounter any issues, ensure your file encodings and naming conventions are correct.
Updated on: 24/04/2026
Thank you!