HowTo: Create a Custom SCInterface UI Language
From SCInterface Wiki
The SCInterface UI allows you to create custom languages for the web interface. The following article describes the [[UI]s architecture for language files and how to create your own custom language.
Background on Languages
As of SCInterface v2.2, there are two interfaces that have three separate sets of language files:
- Main Web Interface - This is the main UI. The configuration setting for this variable is located under scinterface/www/include/variables.php. Modify the following line and make sure it is set to one of the following:
- $LANG = "games";
- $LANG = "sensors";
- $LANG = "servers";
- PocketSCI (Mobile Web) Interface - This is the PDA or mobile interface for the UI. The configuration setting for this variable is located under scinterface/pda/www/include/variables.php. Modify the following line and make sure it is set to one of the following:
- $LANG = "games";
- $LANG = "sensors";
- $LANG = "servers";
Create a Custom Language
One of the things to consider when creating a custom language, is that with each new release of SCInterface, the language default language files listed above will be updated automatically by the SCInterface development team. With a new release, you may want to keep an eye out for any updates or changes to these language files since your language file may need to be updated as well.
The following describes the general process for creating a custom language within SCInterface:
- Think of a name for your new language. In this example, we'll call it mynewlang.
- Create a new language directory for your language for both of the UIs (PocketSCI (Mobile Web) Interface and the Main Web Interface):
- On an Apache/PHP Linux server:
- mkdir scinterface/lang/mynewlang/
- mkdir scinterface/pda/lang/mynewlang/
- On an Apache/PHP Linux server:
- Make a copy of the default language en for both of the UIs (PocketSCI (Mobile Web) Interface and the Main Web Interface) to the mynewlang folder:
- On an Apache/PHP Linux server:
- cp scinterface/lang/en/* scinterface/lang/mynewlang/
- cp scinterface/pda/lang/en/* scinterface/pda/lang/mynewlang/
- On an Apache/PHP Linux server:
- The language configuration settings for both of the UIs (PocketSCI (Mobile Web) Interface and the Main Web Interface) will need to be configured to use mynewlang for the variable $LANG:
- On an Apache/PHP Linux server:
- Edit the Main Web Interface:
- vi scinterface/www/include/variables.php
- Edit $LANG = "mynewlang";
- Save scinterface/www/include/variables.php (within vi, type :wq)
- Edit the PocketSCI (Mobile Web) Interface:
- vi scinterface/pda/www/include/variables.php
- Edit $LANG = "mynewlang";
- Save scinterface/pda/www/include/variables.php (within vi, type :wq)
- Edit the Main Web Interface:
- On an Apache/PHP Linux server:
- Edit all of the files within the mynewlang folder for both of the UIs (PocketSCI (Mobile Web) Interface and the Main Web Interface):
- On an Apache/PHP Linux server:
- scinterface/lang/mynewlang/langfile.php
- scinterface/lang/mynewlang/preheader-langfile.php
- scinterface/lang/mynewlang/titles.php
- scinterface/pda/lang/mynewlang/langfile.php
- scinterface/pda/lang/mynewlang/preheader-langfile.php
- scinterface/pda/lang/mynewlang/titles.php
- On an Apache/PHP Linux server:
- The mynewlang language is now ready to be used by both the PocketSCI (Mobile Web) Interface and the Main Web Interface.

