Update of /cvsroot/openinteract/OpenInteract2/doc/Manual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4782/doc/Manual
Modified Files:
I18N.pod
Log Message:
OIN-143: be able to read localization messages from PO/MO files just like our custom .msg files
Index: I18N.pod
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/doc/Manual/I18N.pod,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** I18N.pod 25 Feb 2005 05:40:17 -0000 1.12
--- I18N.pod 12 Mar 2005 18:37:17 -0000 1.13
***************
*** 221,232 ****
myapp-en.msg # lang is 'en'
! myotherapp-es-MX.dat # ...'es-MX'
! messages_en-HK.msg # ...'en-HK'
The following are not:
english-messages.msg
! messages-en-part2.msg
! messagesen.msg
If you create a message filename that does not conform to this
--- 221,232 ----
myapp-en.msg # lang is 'en'
! myotherapp-es-MX.mo # ...'es-MX'
! messages_en_HK.po # ...'en_HK'
The following are not:
english-messages.msg
! messages-en-part2.mo
! messagesen.po
If you create a message filename that does not conform to this
***************
*** 234,238 ****
localization reading process altogether.
! =head2 Message File Format
The message file format is fairly simple:
--- 234,264 ----
localization reading process altogether.
! You can check whether your application's message filenames are
! formatted properly with the 'check_package' task will alert you to
! malformed message filenames -- see
! L<OpenInteract2::Manage::Package::Check> or just run from your package
! development directory:
!
! $ oi2_manage check_package
!
! =head1 MESSAGE FILES
!
! =head2 Supported Formats: PO, MO and Custom
!
! OpenInteract2 supports reading localized messages from
! C<gettext>-formatted files (a.k.a, 'PO' or 'MO' files) as well as a
! custom format. All are treated in the same way -- once read in all
! messages get flattened into a single per-language namespace regardless
! of their source.
!
! To include localization files with your package just drop them into
! the 'msg/' subdirectory. OI2 will find them at server startup and read
! them all in.
!
! Note that if you use PO or MO files you'll need to have
! L<Locale::Maketext::Lexicon> installed. If you don't the server
! startup process will halt and tell you to install it.
!
! =head2 Custom Message File Format
The message file format is fairly simple:
***************
*** 308,312 ****
The '\' B<must> be at the end of the line or the remainder of your
message will get lost. (You may have whitespace between the '\' and
! the end of line, but that may not be the case forever.)
=item 2.
--- 334,338 ----
The '\' B<must> be at the end of the line or the remainder of your
message will get lost. (You may have whitespace between the '\' and
! the end of line.)
=item 2.
***************
*** 334,338 ****
db.error.process = While processing the statement [_1] the database \
! returned an error [_2]
In another language this might be something like the following
--- 360,364 ----
db.error.process = While processing the statement [_1] the database \
! returned an error [_2]
In another language this might be something like the following
***************
*** 340,344 ****
db.error.process = La base de datos volvio un error [_2] mientras \
! que procesaba la declaracion [_1]
When we ask for the message we need to pass in two values which will
--- 366,370 ----
db.error.process = La base de datos volvio un error [_2] mientras \
! que procesaba la declaracion [_1]
When we ask for the message we need to pass in two values which will
***************
*** 513,516 ****
--- 539,546 ----
L<Locale::Maketext|Locale::Maketext>
+ L<Locale::Maketext::Lexicon|Locale::Maketext::Lexicon>
+
+ gettext: L<http://www.gnu.org/software/gettext/>
+
openinteract-dev mailing list:
|