* Move section on Programming I18N Compliant Applications to
Developers Handbook. * Rename Advanced Topics to Compiling I8N Programs Suggested by: murray and nik
This commit is contained in:
parent
6cfc9d250f
commit
8b17c95d00
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10675
1 changed files with 15 additions and 96 deletions
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/l10n/chapter.sgml,v 1.67 2001/08/21 23:44:13 murray Exp $
|
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/l10n/chapter.sgml,v 1.68 2001/08/22 05:07:12 murray Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="l10n">
|
<chapter id="l10n">
|
||||||
|
@ -666,103 +666,22 @@ keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
<title>Advanced Topics</title>
|
<title>Compiling I18N Programs</title>
|
||||||
|
|
||||||
<para>If you wish to compile I18N applications or program I18N
|
<para>Many FreeBSD Ports have been ported with I18N support. Some
|
||||||
compliant applications, please read this section.</para>
|
of them are marked with -I18N in the port name. These and many
|
||||||
|
other programs have built in support for I18N and need no special
|
||||||
|
consideration.</para>
|
||||||
|
|
||||||
<sect2>
|
<indexterm>
|
||||||
<title>Compiling I18N Programs</title>
|
<primary><application>MySQL</application></primary>
|
||||||
|
</indexterm>
|
||||||
<para>Many FreeBSD Ports have been ported with I18N support. Some
|
<para>However, some applications such as
|
||||||
of them are marked with -I18N in the port name. These and many
|
<application>MySQL</application> need to be have the
|
||||||
other programs have built in support for I18N and need no special
|
<filename>Makefile</filename> configured with the specific
|
||||||
consideration.</para>
|
charset. This is usually done in the
|
||||||
|
<filename>Makefile</filename> or done by passing a value to
|
||||||
<indexterm>
|
configure in the source.</para>
|
||||||
<primary><application>MySQL</application></primary>
|
|
||||||
</indexterm>
|
|
||||||
<para>However, some applications such as
|
|
||||||
<application>MySQL</application> need to be have the
|
|
||||||
<filename>Makefile</filename> configured with the specific
|
|
||||||
charset. This is usually done in the
|
|
||||||
<filename>Makefile</filename> or done by passing a value to
|
|
||||||
configure in the source.</para>
|
|
||||||
</sect2>
|
|
||||||
|
|
||||||
<sect2>
|
|
||||||
<title>Programming I18N Compliant Applications</title>
|
|
||||||
<indexterm><primary>Qt</primary></indexterm>
|
|
||||||
<indexterm><primary>GTK</primary></indexterm>
|
|
||||||
<para>To make your application more useful for speakers of other
|
|
||||||
languages, we hope that you will program I18N compliant. The GNU
|
|
||||||
gcc compiler, GUI Libraries like QT and GTK support I18N through
|
|
||||||
special handling of strings. Making a program I18N compliant is
|
|
||||||
very easy. It allows contributors to port your application to
|
|
||||||
other languages quickly. Refer to library specific I18N
|
|
||||||
documentation for more details.</para>
|
|
||||||
|
|
||||||
<para>To the contrary of common perception, I18N compliant code is
|
|
||||||
easy to write. Usually, it only involves wrapping your strings
|
|
||||||
with library specific functions. In addition, please be sure to
|
|
||||||
allow for wide or multibyte characters support.</para>
|
|
||||||
|
|
||||||
<sect3>
|
|
||||||
<title>A Call to Unify the I18N Effort</title>
|
|
||||||
|
|
||||||
<para>It has come to our attention that the individual I18N/L10N
|
|
||||||
efforts for each country has been repeating each others'
|
|
||||||
efforts. Many of us have been reinventing the wheel repeatedly
|
|
||||||
and inefficiently. We hope that the various major groups in
|
|
||||||
I18N could congregate into a group effort similar to the Core
|
|
||||||
Team's responsibility.</para>
|
|
||||||
|
|
||||||
<para>Currently, we hope that, when you write or port I18N
|
|
||||||
programs, you would send it out to each country's related
|
|
||||||
FreeBSD mailing lists for testing. In the future, we hope to
|
|
||||||
create applications that work in all the languages
|
|
||||||
out-of-the-box without dirty hacks.</para>
|
|
||||||
|
|
||||||
<para>The mailing list <email>FreeBSD-I18N@FreeBSD.org</email>
|
|
||||||
has been established. If you are an I18N/L10N developer,
|
|
||||||
please send your comments, ideas, questions, and anything
|
|
||||||
you deem related to it. </para>
|
|
||||||
|
|
||||||
<para> Michael C. Wu will be maintaining an I18N works in progress
|
|
||||||
homepage at <ulink
|
|
||||||
url="http://www.FreeBSD.org/~keichii/i18n/index.html">http://www.FreeBSD.org/~keichii/i18n/index.html</ulink>
|
|
||||||
Please also read the BSDCon2000 I18N paper and presentations
|
|
||||||
by Clive Lin, Chia-Liang Kao, and Michael C. Wu at <ulink
|
|
||||||
url="http://www.FreeBSD.org/~keichii/papers/">http://www.FreeBSD.org/~keichii/papers/</ulink></para>
|
|
||||||
</sect3>
|
|
||||||
|
|
||||||
<sect3>
|
|
||||||
<title>Perl and Python</title>
|
|
||||||
<indexterm>
|
|
||||||
<primary>Perl</primary>
|
|
||||||
</indexterm>
|
|
||||||
<indexterm>
|
|
||||||
<primary>Python</primary>
|
|
||||||
</indexterm>
|
|
||||||
|
|
||||||
<para>Perl and Python have I18N and wide characters handling
|
|
||||||
libraries. Please use them for I18N compliance.</para>
|
|
||||||
|
|
||||||
<para>In older FreeBSD versions,
|
|
||||||
Perl may gives warning about not having a wide characters locale
|
|
||||||
that is already installed in your system. You can set the
|
|
||||||
environmental variable <envar>LD_PRELOAD</envar> to
|
|
||||||
<filename>/usr/lib/libxpg4.so</filename> in your shell.</para>
|
|
||||||
|
|
||||||
<para>In <literal>sh</literal>-based shells:</para>
|
|
||||||
|
|
||||||
<programlisting><envar>LD_PRELOAD=/usr/lib/libxpg4.so</envar></programlisting>
|
|
||||||
|
|
||||||
<para>In <literal>C</literal>-based shells:</para>
|
|
||||||
|
|
||||||
<programlisting><envar>setenv LD_PRELOAD /usr/lib/libxpg4.so</envar></programlisting>
|
|
||||||
</sect3>
|
|
||||||
</sect2>
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="lang-setup">
|
<sect1 id="lang-setup">
|
||||||
|
|
Loading…
Reference in a new issue