During the 3rd week of my Summer of Code, I worked on implementing Localization of different languages on the system and creating a different settings page for user and admin.
One of our goals is for Engelsystem to be a great experience for users worldwide. To achieve this goal we need to make some significant changes. The main reason of localization is that it can be used by different people with different native languages across the world and help them to understand the system better .
First, a little background.
Right now, Engelsystem has two localization systems available:
All of the current translations will be updated. We are also expanding the list of supported languages to as many as we can. Currently, I’ve implemented:
- Chinese- simplified
- English UK
The tools used in implementing localization are poedit where we create the .po files .
For installing Poedit on Linux distro’s, users can use the following command in the terminal,
sudo apt-get install poedit
For Windows and Mac users, they can download the executable file here.
Steps to run Poedit in Linux/Windows/Mac:
- choose File → New Catalog.Enter the details in Translation properties like your email. Source code charset should be selected as UTF-8.Now the source path should be selected as (.) dot to tell Poedit to search for PHP files in the same folder.
- In the source, there are three options ‘_’ , ‘gettext’ and ‘gettext_noop’.Make sure all necessary functions are added and press OK.
- Now we can see the list of strings on left and their translated strings on the right.we need to install the necessary dictionary for this.
- Save the file with an extension ‘.po’ .
In Engelsystem, to implement the translated localization file we need to make the changes in the file,internationalization_helper.php
$locales = array( ‘de_DE.UTF-8’ => “Deutsch”, ‘hi_IN.UTF-8’ => “Hindi”, ‘sp_EU.UTF-8’ => “Spanish”, ‘en_US.UTF-8’ => “English” );
During the week 3 of my Summer of Code I also worked on creating different settings page for user and Admin. Earlier settings page for user and admin were same, providing same privileges to both of them. Now we have separate pages for both.
In the later weeks, other developers and I would be working on adding more languages to the system. Anyone who would like to work in the project are welcome. Developers can feel free to take up any issues they would like to work on just like any other open source projects.
Development: https://github.com/fossasia/engelsystem Issues/Bugs:https://github.com/fossasia/engelsystem/issues
You must be logged in to post a comment.