Actions

LimeSurvey 1.x navigating the source code: Difference between revisions

From LimeSurvey Manual

No edit summary
m (Reverted edits by EMILIOACOSTADIAZ (talk) to last revision by C schmitz)
 
(5 intermediate revisions by 3 users not shown)
Line 28: Line 28:
To translate some text displayed on screen you have to either create a new instance of ''''limesurvey_lang'''' (limesurvey\classes\core\language.php) or in some cirumstances there is already an instance created called ''''$clang''''.
To translate some text displayed on screen you have to either create a new instance of ''''limesurvey_lang'''' (limesurvey\classes\core\language.php) or in some cirumstances there is already an instance created called ''''$clang''''.


To translate you call the function '''gT'''  ($clang->gT(string))
To translate you call the function '''gT'''  ($clang->gT(string)). More '''[http://docs.limesurvey.org/Coding+guidelines#Localization information on how to use localization]''' can be found here.


In general '''$clang''' is set in (limesurvey\common.php) and uses a number of variables to determine language.
In general '''$clang''' is set in (limesurvey\common.php) and uses a number of variables to determine language.

Latest revision as of 01:33, 6 November 2014

After downloading the source code via SVN (See: Accessing the Source Code) you see the following directories:

Source

/limesurvey

This is the current stable branch of LimeSurvey and contains the latest hotfixes and translation updates.

/original art

This is the directory with the original arts used in LimeSurvey.

/server-scripts

In this directory are server scripts which are in use in http://www.limesurvey.org .

releases

In this directory are the files, as they are delivered in the download package of the according version.

Code

''''''''''_

Translations

To translate some text displayed on screen you have to either create a new instance of 'limesurvey_lang' (limesurvey\classes\core\language.php) or in some cirumstances there is already an instance created called '$clang'.

To translate you call the function gT  ($clang->gT(string)). More information on how to use localization can be found here.

In general $clang is set in (limesurvey\common.php) and uses a number of variables to determine language.

s_lang

$baselang

$_SESSION['adminlang']