Added support for language LDAP attribute
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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") |
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
@@ -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/)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user