File: translation.ssc

package info (click to toggle)
stellarium 24.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 911,396 kB
  • sloc: ansic: 317,377; cpp: 204,602; xml: 48,590; javascript: 26,348; python: 1,254; perl: 1,108; sh: 207; makefile: 190; pascal: 169
file content (26 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//
// Name:        Example of translations
// License:     Public Domain
// Author:      Matthew Gates
// Description: Illustration of using translation.inc
//

include ("../translation.inc");

setTr("de", "Hello world", "Hallo Welt");
setTr("de", "Knife", "das Messer");

dumpTr();

messages = new Array("Hello world", "Bananas are marsupials", "Knife", "Pra-Bob");

originalLanguage = core.getAppLanguage();

core.setAppLanguage("de");
for(i=0; i<messages.length; i++)
{
	core.debug("\"" + messages[i] + "\" in " + core.getAppLanguage() + " is \"" + tr(messages[i]) + "\"");
}

core.setAppLanguage(originalLanguage);