Translations

Osclass allows administrators to manage translations for the core system, themes, and plugins. Proper translation management ensures a localized experience for users in different languages. This guide explains how to create, update, copy, and share translations within the Osclass backoffice.

We recommend to use built-in translation service that has a lot of features.
If you don't have time for translations, check free Translator Plugin (Using DeepL API that has very high free usage limits)

Note that adding language itself into Osclass does not mean your core, theme and plugins will be automatically translated!

Translation Files and Formats

Osclass uses .mo files for extracting translations. These files are compiled from .po files. It is recommended to use Poedit, a free program, to manage translation files efficiently. Osclass does not directly use .po files but relies on .mo files for displaying translations.

Managing Translations

To manage translations, navigate to International > Translations in the Osclass backoffice.

Translations management
Translations management

Here, you can edit existing translations, create new ones, or copy translations between languages.

Creating or Updating Translations

  • Select the Language you want to translate.
  • Choose the Type of Translation (Core, Theme, or Plugin).
  • If translating a theme or plugin, select the specific theme/plugin from the dropdown list.
  • Click Edit Translation to proceed with modifications.

Copying Translations

Osclass allows copying translations from one language to another. This is useful when maintaining consistency across multiple language files.

  • Select a Source Language and Type (Core, Theme, or Plugin).
  • Specify a Target Language and Type.
  • Click Update Translation to copy missing translations while preserving existing ones.

List of Existing Translations

The translation manager displays all available translations:

  • Core: System and administrative translations.
  • Themes: Language files for installed themes.
  • Plugins: Language files for installed plugins.

Each entry displays the number of files and strings translated. Incomplete translations are marked accordingly.

Editing Translations

Large translation files like Osclass core require a lot of inputs. You may need to increase your PHP variable max_input_vars to larger number (ie 10000) to be able to process all the inputs.

When editing a translation, the system provides a side-by-side view of the original text and the translated text.

Edit translation
Edit translation
  • Search for specific words or phrases to modify.
  • Filter untranslated or problematic strings.
  • Add new translation entries manually.
  • Save changes to update the .po file and regenerate the .mo file.

Updating Translations from Source Code

If a translation file does not exist, Osclass allows generating it from the source code:

  • Click Create from Source Code if the file is missing.
  • Click Update from Source Code to add new untranslated strings from Osclass core, themes, or plugins.

Downloading and Sharing Translations

  • Download translations as an archive for backup or external editing.
  • Share completed translations with the community via the Provide to Community option.
  • Ensure translations are fully completed before sharing.

Troubleshooting Translation Issues

If you encounter translation issues:

  • Ensure the .mo file is correctly generated (It's not sufficient to update just .po file. After saving translation, .mo file gets updated and it's source for Osclass!).
  • Check file permissions for the translation folder.
  • Use Poedit to validate and recompile translations.
  • Verify that new translations have been properly applied and saved.

Conclusion

Osclass provides an efficient translation management system, allowing administrators to localize their classifieds website easily. Using the built-in translation tools or Poedit ensures accurate and up-to-date translations for a seamless multilingual experience.