-
Notifications
You must be signed in to change notification settings - Fork 13
Translations
Currently LDAP SDK provides translations for standard LDAP error messages for the following languages:
-
German (DE)
-
French (FR)
-
Japanese (JA)
The translations are stored in property files and packaged into ldapjdk.jar
:
$ jar tvf /usr/share/java/ldapjdk/ldapjdk.jar | grep ErrorCodes 1364 Mon Oct 23 23:32:00 CDT 2023 netscape/ldap/errors/ErrorCodes.props 1808 Mon Oct 23 23:32:00 CDT 2023 netscape/ldap/errors/ErrorCodes_de.props 1591 Mon Oct 23 23:32:00 CDT 2023 netscape/ldap/errors/ErrorCodes_fr.props 4291 Mon Oct 23 23:32:00 CDT 2023 netscape/ldap/errors/ErrorCodes_ja.props
Unfortunately these translations are no longer actively maintained and may contain errors so they might be removed in the future.
If the current translation is broken and causing a problem at runtime, here are some options:
-
update the translation
-
remove the translation
If the translation can be fixed, export the current translation from ldapjdk.jar
, fix the translation, then re-import the translation into ldapjdk.jar
.
To export the current translation for a language (e.g. Japanese) use the following command:
$ jar xvf /usr/share/java/ldapjdk/ldapjdk.jar netscape/ldap/errors/ErrorCodes_ja.props inflated: netscape/ldap/errors/ErrorCodes_ja.props
The correction can be done in the property file (i.e. netscape/ldap/errors/ErrorCodes_ja.props
) directly.
To import the new translation use the following command:
$ jar uvf /usr/share/java/ldapjdk/ldapjdk.jar netscape/ldap/errors/ErrorCodes_ja.props
If the translation cannot be fixed, simply remove the translation from ldapjdk.jar
so the LDAP error messages will appear in the default language (i.e. English).
To remove the translation (e.g. Japanese) use the following command:
$ zip -d /usr/share/java/ldapjdk/ldapjdk.jar netscape/ldap/errors/ErrorCodes_ja.props