.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "SVN::Web::I18N 3pm" .TH SVN::Web::I18N 3pm "2016-11-12" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" SVN::Web::I18N \- SVN::Web internationalisation class .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use SVN::Web::I18N; # Nothing exported \& \& # Add a directory that contains .po and/or .mo files \& SVN::Web::I18N::add_directory(\*(Aq/path/to/directory\*(Aq); \& \& # Specify the current language \& SVN::Web::I18N::loc_lang(\*(Aqen\*(Aq); \& \& # Get a translated string \& my $xlated = SVN::Web::I18N::loc(\*(Aq(a string to translate)\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" SVN::Web::I18N provides the interface through which SVN::Web is internationalised, and how different localisations are implemented. .SH "SUBROUTINES" .IX Header "SUBROUTINES" .SS "SVN::Web::I18N::add_directory($path)" .IX Subsection "SVN::Web::I18N::add_directory($path)" Adds a new directory to the list of directories in which localisations will be found. Any \fI*.po\fR and \fI*.mo\fR files in this directory will automatically be scanned for localisations, and added to the language key given by the file's basename. .PP In case where two different directories both contain a localisation file that defines the same localisation key for the same language, the localisation key from the most recently added directory will be used. .SS "SVN::Web::I18N::loc_lang($lang)" .IX Subsection "SVN::Web::I18N::loc_lang($lang)" Selects the language to use for subsequent calls to \f(CW\*(C`loc()\*(C'\fR. The \f(CW$lang\fR parameter should be a valid language name \*(-- i.e., there must exist at least one \fI\f(CI$lang\fI.po\fR file in one of the directories used in a call to \&\f(CW\*(C`SVN::Web::I18N::add_directory()\*(C'\fR. .SS "SVN::Web::I18N::loc($text)" .IX Subsection "SVN::Web::I18N::loc($text)" and .ie n .SS "SVN::Web::I18N::loc($text, $param1, ...)" .el .SS "SVN::Web::I18N::loc($text, \f(CW$param1\fP, ...)" .IX Subsection "SVN::Web::I18N::loc($text, $param1, ...)" Returns the localised form of \f(CW$text\fR according to the localisation selected by the most recent call to \f(CW\*(C`loc_lang()\*(C'\fR. .PP If the localisation expects parameters to \fIfill in\fR the localisation result they should be passed as the second and subsequent arguments. .PP If \f(CW$text\fR does not have a defined localised form it is returned with the parameters interpolated in to it. .SH "SEE ALSO" .IX Header "SEE ALSO" Locale::Maketext, Locale::Maketext::Lexicon, SVN::Web .SH "AUTHORS" .IX Header "AUTHORS" Nik Clayton \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2006\-2007 by Nik Clayton \f(CW\*(C`\*(C'\fR. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See