-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.language
88 lines (73 loc) · 2.88 KB
/
README.language
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
How to add a new language
#########################
1) add a new code into scripts/slovnikar.cpp
============================================
$ git diff scripts/slovnikar.cpp
diff --git a/scripts/slovnikar.cpp b/scripts/slovnikar.cpp
index e232552..a4abab5 100644
--- a/scripts/slovnikar.cpp
+++ b/scripts/slovnikar.cpp
@@ -22,15 +22,20 @@
*
* ------------------------------------------------------------------------ */
- const char* language[] = { "en", "ca", "cz", "du", "es",
- "fi", "fr", "hu", "ru", "ua" };
+ const char* language[] = { "en",
+ "ca", "cz", "du", "es", "fi",
+ "fr", "hu", "ru", "ua", "zh" };
const int N = sizeof(language)/sizeof(const char*);
- const char* version = "1.11";
+ const char* version = "1.12";
/* ---------------------------------------------------------------------------
*
+ * 1.12 2011-07-10
+ *
+ * - added Chinese translation in GBK encoding (switch "zh")
+ *
* 1.11 2011-04-12
*
* - added Spanish (switch "es")
2) add the new code to bin/gama-local.cpp
=========================================
$ git diff bin/gama-local.cpp
diff --git a/bin/gama-local.cpp b/bin/gama-local.cpp
index 3dc4db7..362b074 100644
--- a/bin/gama-local.cpp
+++ b/bin/gama-local.cpp
@@ -69,7 +69,7 @@ int help()
"Options:\n\n"
"--algorithm svd | gso | cholesky | envelope\n"
- "--language en | ca | cz | du | es | fi | fr | hu | ru | ua \n"
+ "--language en | ca | cz | du | es | fi | fr | hu | ru | ua | zh \n"
"--encoding utf-8 | iso-8859-2 | iso-8859-2-flat | cp-1250 | cp-1251\n"
"--angles 400 | 360\n"
"--latitude <latitude>\n"
@@ -205,6 +205,7 @@ int main(int argc, char **argv)
else if (!strcmp("hu", argv_lang)) set_gama_language(hu);
else if (!strcmp("ru", argv_lang)) set_gama_language(ru);
else if (!strcmp("ua", argv_lang)) set_gama_language(ua);
+ else if (!strcmp("zh", argv_lang)) set_gama_language(zh);
else return help();
}
3) create a new directory and add lanuage files
===============================================
$ ls xml/lang/zh/
gamalib.zh.lang gkfparser.zh.lang pobs.zh.lang rmpoints.zh.lang
gama-local.zh.lang network.zh.lang review.zh.lang
4) add information on new lang files into xml/Makefile.am
=========================================================
EXTRA_DIST = gama-local.dtd \
gama-local-schema.sql \
ellipsoids.xml \
$(lang_extra)
lang_extra = \
lang/en/gamalib.lang \
...... lines removed ......
lang/ua/rmpoints.ua.lang \
lang/zh/gamalib.zh.lang \
lang/zh/gama-local.zh.lang \
lang/zh/gkfparser.zh.lang \
lang/zh/network.zh.lang \
lang/zh/pobs.zh.lang \
lang/zh/review.zh.lang \
lang/zh/rmpoints.zh.lang