How to add new translations and languages - NeosIT/active-directory-integration2 GitHub Wiki

Translations for other languages than English and German can be easily added. Please follow this guide.

Adding a new language

  1. Fork active-directory-integration2
  2. Create a new branch namend "translation-YOUR_LANGUAGE_KEY"
  3. Download Poedit
  4. Start Poedit and select "Create new translation (from PO/POT)"
  5. Select languages/ad-integration-2.0-de_DE.po
  6. Select the target language of the translation
  7. Happy translating
  8. Create a new pull request

Add new translation for existing strings

  1. Select Catalogue > Properties (or Alt + Enter)
  2. On tab Source path select all directories which contains strings (*classes*, *views*, *twig*)
  3. on tab Keywords from source code add
  • __
  • _e
  • esc_html_
  1. Apply with OK
  2. Enable twig cache (active-directory-integration2\classes\Multisite\View\TwigContainer.php line 172)
  3. Visit every site containing ADI strings (Active Directory Integration > Configuration, Test authentication, Sync to AD, Sync to WordPress, Users, a user profile, Profile assignment, Profile options)
  4. Disable twig cache
  5. Push the button Update
  6. not-translated strings should appear