Translate Osclass plugins and themes

For translating an Osclass theme or plugin we will use a translator Poedit. You need to have this program installed on your computer and you are ready to edit or create a new translation language for Osclass.

Edit an Osclass language

In most cases your theme or plugin will have a language folder en_US, this is located in your plugin folder or theme folder in subfolder languages. Download this folder, make a copy and rename with your language code like en_US for English or ro_RO for Romanian.

In the translation folder will be 2 type of files:

.po  -  this file will be edited to change an existing translation or to add new words

.mo - a binary files that will be used by osclass

theme.mo, theme.po - files used when you translate a theme

messages.mo, messages.po - files used when you translate a plugin

Edit the .po file with poedit by right click on the file => open with poedit OR open poedit program =>Edit a translation =>select your file and add the corresponding translation for each word. After you save the file you upload the folder in your theme or plugin languages, the entire folder not just the translation. This folder will contain .po, .mo files.

Create a new translation for Osclass

  1. Open poedit program
  2. Select File => New
  3. Select translation language
  4. Select again File => Save
  5. Select Extract from sources
  6. Click the + sign under the Paths and add the path to your project
  7. Click the Sources keywords tab
  8. Add the following parameters  __   _e   _n:1,2   with enter after each parameter

Now you can start to translate your words and after you finish create a folder with your language code ro_RO for Romanian or other code for other languages. Move this files in that folder but remember to rename the files according to your project. If you translate a theme the files will be theme.po and theme.mo and if you translate a plugin the files will be messages.mo and messages.po. Upload the translation folder In your theme or plugin languages folder.

Subscribe
X

Subscribe!

Subscribe to get the latest listings, updates and special offers delivered directly in your inbox.