mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Mark Craig
15.54.2012 a85ce2f925a7bc0c8dc22f687e09eea3d6dc88fb
Add an example ldapsearch that gets a localized attribute value; begin a chapter on i18n in the dev guide
3 files modified
100 ■■■■■ changed files
opendj3/src/main/docbkx/admin-guide/chap-ldap-operations.xml 52 ●●●●● patch | view | raw | blame | history
opendj3/src/main/docbkx/dev-guide/chap-i18n.xml 23 ●●●● patch | view | raw | blame | history
opendj3/src/site/resources/Example.ldif 25 ●●●●● patch | view | raw | blame | history
opendj3/src/main/docbkx/admin-guide/chap-ldap-operations.xml
@@ -90,6 +90,9 @@
   <listitem><para><xref linkend="complex-filter-search"/></para></listitem>
   <listitem><para><xref linkend="operational-attrs-search"/></para></listitem>
   <listitem><para><xref linkend="attr-desc-list-search"/></para></listitem>
   <listitem><para><xref linkend="escape-characters-in-filter"/></para></listitem>
   <listitem><para><xref linkend="extensible-match-search"/></para></listitem>
   <listitem><para><xref linkend="localized-search"/></para></listitem>
  </itemizedlist>
  
  <example xml:id="simple-filter-search">
@@ -338,8 +341,55 @@
dn: uid=kvaughan,ou=People,dc=example,dc=com
mail: kvaughan@example.com</screen>
  </example>
 </section>
  <example xml:id="localized-search"><?dbfo keep-together="auto"?>
   <title>Search: Language Subtype</title>
   <para>OpenDJ directory server supports many language subtypes. See the
   chapter on <link xlink:href="admin-guide#appendix-l10n"
   xlink:role="http://docbook.org/xlink/role/olink"
   ><citetitle>Localization</citetitle></link> for a list.</para>
   <para>When you perform a search you can request the language subtype by
   OID or by language subtype string. For example, the following search gets
   the French version of a common name. The example uses the
   <command>base64</command> command provided with OpenDJ directory server to
   decode the attribute value.</para>
   <screen>$ ldapsearch
 --port 1389
 --baseDN dc=example,dc=com
 "(givenName:fr:=Fréderique)" cn\;lang-fr
dn: uid=fdupont,ou=People,dc=example,dc=com
cn;lang-fr:: RnJlZMOpcmlxdWUgRHVwb250
$ base64 decode -d RnJlZMOpcmlxdWUgRHVwb250
Fredérique Dupont</screen>
   <itemizedlist>
    <para>At the end of the OID or language subtype, you further specify the
    matching rule as follows:</para>
    <listitem>
     <para>Add <literal>.1</literal> for less than</para>
    </listitem>
    <listitem>
     <para>Add <literal>.2</literal> for less than or equal to</para>
    </listitem>
    <listitem>
     <para>Add <literal>.3</literal> for equal to (default)</para>
    </listitem>
    <listitem>
     <para>Add <literal>.4</literal> for greater than or equal to</para>
    </listitem>
    <listitem>
     <para>Add <literal>.5</literal> for greater than</para>
    </listitem>
    <listitem>
     <para>Add <literal>.6</literal> for substring</para>
    </listitem>
   </itemizedlist>
  </example>
 </section>
 <section xml:id="compare-ldap">
  <title>Comparing Attribute Values</title>
opendj3/src/main/docbkx/dev-guide/chap-i18n.xml
@@ -20,7 +20,7 @@
  !
  ! CCPL HEADER END
  !
  !      Copyright 2011 ForgeRock AS
  !      Copyright 2011-2012 ForgeRock AS
  !    
-->
<chapter xml:id='chap-i18n'
@@ -31,6 +31,23 @@
 xmlns:xinclude='http://www.w3.org/2001/XInclude'>
 <title>Internationalizing Applications</title>
 <para>TODO</para>
 <para>When you internationalize your application &#8212; adapting your
 application for use in different languages and regions &#8212; how much you
 do depends on what you must later localize. Directory servers often support
 localized user data. OpenDJ directory server supports use of the locales
 provided by your Java installation, and also supports many language subtypes,
 for example.</para>
 <para>Therefore if your application is not end user facing and the
 administrators managing your application all use the same language as you do,
 you might be content to use language subtypes in LDAP filters, as described
 in the section on <link xlink:href="dev-guide#about-filters"
 xlink:role="http://docbook.org/xlink/role/olink"><citetitle>Working With
 Search Filters</citetitle></link>.</para>
 <para>For end user facing applications where you must return localized
 messages, TODO</para>
 <para>For applications where administrators need localized log messages,
 TODO</para>
</chapter>
opendj3/src/site/resources/Example.ldif
@@ -3753,6 +3753,31 @@
uidNumber: 1109
gidNumber: 1000
dn: uid=fdupont,ou=People,dc=example,dc=com
objectClass: person
#objectClass: cos
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: posixAccount
objectClass: top
uid: fdupont
#classOfService: gold
userpassword: ratatouille
facsimileTelephoneNumber: +33 1 23 45 67 88
givenName: Fredérique
cn: Frederique Dupont
cn;lang-fr: Fredérique Dupont
telephoneNumber: +33 1 23 45 67 89
sn: Dupont
roomNumber: 0042
homeDirectory: /home/fdupont
mail: fdupont@example.fr
l: Paris
ou: Product Development
ou: People
uidNumber: 1110
gidNumber: 1000
# Quotas by class of service
dn: cn=Bronze Class of Service,dc=example,dc=com
objectClass: collectiveAttributeSubentry