syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/2] syncope git commit: Adding information about Enduser's translation features
Date Wed, 18 Jan 2017 16:20:54 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X 15575d824 -> 617c3f291
  refs/heads/master 6b6b81ebd -> aea6dc8b1


Adding information about Enduser's translation features


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/617c3f29
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/617c3f29
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/617c3f29

Branch: refs/heads/2_0_X
Commit: 617c3f29141c7906b1ff95547ad922a2f8b184ea
Parents: 15575d8
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Wed Jan 18 17:20:29 2017 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Wed Jan 18 17:20:29 2017 +0100

----------------------------------------------------------------------
 .../workingwithapachesyncope/customization.adoc | 38 ++++++++++++++++++++
 1 file changed, 38 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/617c3f29/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc
b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc
index 9671c53..9cb97f0 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/customization.adoc
@@ -348,6 +348,44 @@ generated under the local project's `enduser/src/main/webapp/app/` directory
and
 The files in use by the Apache Wicket-based backend are still subject to the general
 <<override-behavior,override behavior>>, instead.
 
+[[customization-enduser-translations]]
+===== Translations
+
+The <<enduser-application>> comes with a native translation mechanism.
+
+Under the `enduser/src/main/webapp/app/languages/` directory, a sub-directory for each supported
language is available;
+each language sub-directory contains two JSON files:
+
+* `static.json` for application messages;
+* `dynamic.json` for labels (including attributes).
+
+Changing the content of these files will result in updating the Enduser messages accordingly.
+
+[TIP]
+====
+In order to add support for a new language (taking French as reference):
+
+* add the new language entry in `js/controllers/LoginController.js` under `availableLanguages`,
by updating
+```
+      availableLanguages: [
+        {id: '1', name: 'Italiano', code: 'it'},
+        {id: '2', name: 'English', code: 'en'},
+        {id: '3', name: 'Deutsch', code: 'de'}
+      ],
+```
+as
+```
+      availableLanguages: [
+        {id: '1', name: 'Italiano', code: 'it'},
+        {id: '2', name: 'English', code: 'en'},
+        {id: '3', name: 'Deutsch', code: 'de'}
+        {id: '4', name: 'Français', code: 'fr'}
+      ],
+```
+* copy the `enduser/src/main/webapp/app/languages/en/` directory into `enduser/src/main/webapp/app/languages/fr/`
+and modify the JSON files under the new directory
+====
+
 [[customization-extensions]]
 ==== Extensions
 


Mime
View raw message