Changes for SSL Configuration and Client side certificates
[openemr.git] / interface / language / lang.info.html
blob4ac10efe32ed256dc0321c6ed0010198f753fc22
1 <pre>
3 OpenEMR Internationalization Documentation
5 I. Multi-Language Tool
6 II. Official OpenEMR Language Translations
7 III. Language Translations Setting
8 IV. Developer Instructions
10 I. Multi Language Tool.
12 This is the Language Administration page in OpenEMR. This is where you can
13 customize languages and language definitions. You can add new languages,
14 ,add new English Constants, and modify/add language definitions. (Please note
15 you can also enter your translations into the official OpenEMR Language
16 Translation GoogleDoc spreadsheet; see section II. for details)
18 The following is an explanation of the options in this tool:
19 Add Language: You get a box to enter a new language.
20 Add Constant: You get a box to add a new string to be used in the translation
21 function, this one should be used only if you know what you are
22 doing, mostly, if you added some custom programming with new
23 text output. The "constant" string can be literally what you
24 want to say or a shorter reference to it.
25 Edit Definitions: English is used as the reference language, if you click
26 the English label you'll get a set of all constants and
27 the English definitions at the side. If no definition is
28 loaded yet for a given constant then a blank box is shown,
29 by entering a definition and clicking "Load Definition"
30 you save whatever changes you made. If you click other
31 label than English, you get a set of all constants,
32 the English definition at the side, and an input box
33 to enter/modify the definition in the selected language.
36 II. Official OpenEMR Language Translations
38 The OpenEMR language translations are built from a collaborative Google
39 Doc. If you would like to add a language or help with a current language,
40 please contact us. You could then enter your translations into this
41 spreadsheet, which will then become a permanent part of OpenEMR. This
42 process has become very streamlined with a fast turnaround time, so
43 we would suggest you enter data on this collaborative spreadsheet rather
44 than entering into your local OpenEMR installation only. To download the
45 most uptodate set of translations, visit our wiki at oemr.org.
48 III. Language Translations Setting
50 These are configured in the openemr/interface/globals.php
51 file. Mainly, you can configure the default language and
52 what is displayed in the login language selection menu (you
53 can also disable this menu). There are also more advanced
54 setting to turn off certain parts of the translation
55 engine. Please see the Language section of
56 openemr/interface/globals.php for more details.
59 IV. Developer Instructions
61 The translation is done by the xl() custom function, which can be found
62 at openemr/library/translation.inc.php.
63 Its semantics are very simple.
65 xl (string,'r',string-prepend,string-append)
67 Which with examples means:
69 xl ('translate this')
71 By default the function will return (after all, is a function) the translation.
73 First it uses the LANGUAGE constant defined to pick the translation.
75 Second it goes for the translation, if none is found, then the same string entered is used and returned as is.
77 The first optional and only argument is 'e' which stands for echo. Use it if you want the function to echo the translated result instead of returning it.
79 i.e.
80 xl ('translate this','e')
82 But if you are already within another function, then you want the function to return something.
84 i.e.
85 echo ("this and" . xl('translate this') . "that too");
87 The third and fourth optional arguments are strings to be prepend and appended respectively.
89 i.e.
90 xl ('translate this','e','&#60b>','&#60/b>');
92 will echo
93 &#60b>this translated&#60/b>
95 If you want only something to be appended in the a return, then you must supply empty second and third arguments.
97 i.e.
98 xl ('translate this','','','&#60br>');
99 will echo
100 this translated&#60br>
102 There are also wrappers to the xl() function that are used infrequently in specific situations. Please
103 refer to openemr/library/translation.inc.php for more details.
105 </pre>