diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-07 18:05:33 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-07 18:05:33 -0400 |
commit | 55ee906ba36cf66c3a390c98dde75e241de26e65 (patch) | |
tree | ed4e5419bb6254c97d63d6a5cab5ab74536201a0 /doc | |
parent | aac11a609c58ec8356e1ca479da456876034b06c (diff) |
Added support for language LDAP attribute
Diffstat (limited to 'doc')
-rw-r--r-- | doc/config.markdown | 4 | ||||
-rw-r--r-- | doc/ldap-parameters.markdown | 1 | ||||
-rw-r--r-- | doc/plugin-registration.markdown | 2 | ||||
-rw-r--r-- | doc/translations.markdown | 2 |
4 files changed, 7 insertions, 2 deletions
diff --git a/doc/config.markdown b/doc/config.markdown index a8df887f..0e3c3198 100644 --- a/doc/config.markdown +++ b/doc/config.markdown @@ -152,6 +152,10 @@ define('LDAP_USER_ATTRIBUTE_GROUPS', 'memberof'); // LDAP attribute for user avatar image: thumbnailPhoto or jpegPhoto define('LDAP_USER_ATTRIBUTE_PHOTO', ''); +// LDAP attribute for user language, example: 'preferredlanguage' +// Put an empty string to disable language sync +define('LDAP_USER_ATTRIBUTE_LANGUAGE', ''); + // Allow automatic LDAP user creation define('LDAP_USER_CREATION', true); diff --git a/doc/ldap-parameters.markdown b/doc/ldap-parameters.markdown index c18c2b06..80decc67 100644 --- a/doc/ldap-parameters.markdown +++ b/doc/ldap-parameters.markdown @@ -21,6 +21,7 @@ Here is the list of available LDAP parameters: | `LDAP_USER_ATTRIBUTE_EMAIL` | mail | LDAP attribute for user email | | `LDAP_USER_ATTRIBUTE_GROUPS` | memberof | LDAP attribute to find groups in user profile | | `LDAP_USER_ATTRIBUTE_PHOTO` | Empty | LDAP attribute to find user photo (jpegPhoto or thumbnailPhoto | +| `LDAP_USER_ATTRIBUTE_LANGUAGE` | Empty | LDAP attribute for user language (preferredlanguage), the accepted language format is "fr-FR" | | `LDAP_USER_CREATION` | true | Enable automatic LDAP user creation | | `LDAP_GROUP_ADMIN_DN` | Empty | LDAP DN for administrators (Example: "CN=Kanboard-Admins,CN=Users,DC=kanboard,DC=local") | | `LDAP_GROUP_MANAGER_DN` | Empty | LDAP DN for managers (Example: "CN=Kanboard Managers,CN=Users,DC=kanboard,DC=local") | diff --git a/doc/plugin-registration.markdown b/doc/plugin-registration.markdown index f212fc2e..03b3c841 100644 --- a/doc/plugin-registration.markdown +++ b/doc/plugin-registration.markdown @@ -86,7 +86,7 @@ Plugin can be translated in the same way as the rest of the application. You mus ```php $this->on('app.bootstrap', function($container) { - Translator::load($container['config']->getCurrentLanguage(), __DIR__.'/Locale'); + Translator::load($container['language']->getCurrentLanguage(), __DIR__.'/Locale'); }); ``` diff --git a/doc/translations.markdown b/doc/translations.markdown index 00707e1c..074d9ae3 100644 --- a/doc/translations.markdown +++ b/doc/translations.markdown @@ -16,7 +16,7 @@ How to translate Kanboard to a new language? 1. Make a new directory: `app/Locale/xx_XX` for example `app/Locale/fr_CA` for French Canadian 2. Create a new file for the translation: `app/Locale/xx_XX/translations.php` 3. Use the content of the French locales and replace the values -4. Inside the file `app/Model/Config.php`, add a new entry for your translation inside the function `getLanguages()` +4. Update the file `app/Model/Language.php` 5. Check with your local installation of Kanboard if everything is OK 6. Send a [pull-request with Github](https://help.github.com/articles/using-pull-requests/) |