summaryrefslogtreecommitdiff
path: root/lang/README
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2016-08-27 15:59:27 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2016-08-27 15:59:27 +0100
commit7210d1a2cfb33e870901629b2423a2f183c08954 (patch)
treef87b9b40139ea001dedab20a5ee132385c28c53b /lang/README
parente3e7951c1c1c6f465ffa8150ce395a98f4d3afd5 (diff)
downloadgitano-7210d1a2cfb33e870901629b2423a2f183c08954.tar.gz
Initial i18n/l10n of gitano-setup
Diffstat (limited to 'lang/README')
-rw-r--r--lang/README36
1 files changed, 36 insertions, 0 deletions
diff --git a/lang/README b/lang/README
new file mode 100644
index 0000000..9d0ec82
--- /dev/null
+++ b/lang/README
@@ -0,0 +1,36 @@
+This is the Gitano language pack tree. Files in here are installed into
+Gitano's lang tree in the share directory. These files form the basis of
+Gitano's i18n approach and are lazily loaded into a Tongue codex.
+
+Each language has to be parented properly. For Gitano to do this, there must
+be a file called `langname.parent` whose content is the name of the language to
+act as the parent language. If this file is absent, the following algorithm is
+used:
+
+1. If the language is called 'json' then it has no parent
+2. If the language matches [^_]+_[^_+] then it is parented to the language
+ of its prefix. E.g. en_GB is parented to en.
+3. Otherwise the language is assumed be parented to 'en' in order that every
+ language will have translations of some kind. ('en' is the Gitano basic
+ language)
+
+This means that you only need special parenting for unusual languages such as
+'en_PIRATE' which might inherit from 'en_GB' or 'en_CA' which might inherit
+mostly from 'en_GB'.
+
+Languages in this directory are then files whose names are of the form:
+
+ langname.lua
+
+These files are of the form:
+
+ return {
+ TOKENNAME = "expansionstring",
+ ANOTHERTOKEN = "somemore strings",
+ }
+
+In addition, when loading plugins, Gitano will add (from the plugin tree)
+pluginname_langname.lua to the list of files. They should be of the same form
+as the above.
+
+