|
894.
|
|
|
Support C preprocessor directives. When this option is set, po4a will consider preprocessor directives as paragraph separators. This is important if the XML file must be preprocessed because otherwise the directives may be inserted in the middle of lines if po4a consider it belong to the current paragraph, and they won't be recognized by the preprocessor. Note: the preprocessor directives must only appear between tags (they must not break a tag).
|
|
|
type: textblock
|
|
|
|
Support C preprocessor directives. When this option is set, po4a will consider preprocessor directives as paragraph separators. This is important if the XML file must be preprocessed because otherwise the directives may be inserted in the middle of lines if po4a consider it belong to the current paragraph, and they won't be recognised by the preprocessor. Note: the preprocessor directives must only appear between tags (they must not break a tag).
|
|
Translated and reviewed by
Robert Readman
|
|
|
|
Located in
lib/Locale/Po4a/Xml.pm:412
|
|
895.
|
|
|
translated
|
|
|
|
(no translation yet)
|
|
|
|
896.
|
|
|
unstranslated
|
|
|
|
(no translation yet)
|
|
|
|
Located in
lib/Locale/Po4a/Xml.pm:309
|
|
897.
|
|
|
Space-separated list of the tags you want to translate or not. The tags must be in the form <aaa>, but you can join some (<bbb><aaa>) to indicate that the content of the tag <aaa> will only be translated when it’s into a <bbb> tag.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
lib/Locale/Po4a/Xml.pm:311
|
|
898.
|
|
|
You can also specify some tag options putting some characters in front of the tag hierarchy. For example, you can put ’w’ (wrap) or ’W’ (don’t wrap) to overide the default behavior specified by the global "wrap" option.
|
|
|
|
(no translation yet)
|
|
|
|
899.
|
|
|
DEFINE WHAT TAGS AND ATTRIBUTES TO TRANSLATE
|
|
|
type: =head2
|
|
|
|
DEFINE WHAT TAGS AND ATTRIBUTES TO TRANSLATE
|
|
Translated and reviewed by
Malcolm Parsons
|
|
|
|
Located in
lib/Locale/Po4a/Xml.pm:560
|
|
900.
|
|
|
The simplest customization is to define which tags and attributes you want the parser to translate. This should be done in the initialize function. First you should call the main initialize, to get the command-line options, and then, append your custom definitions to the options hash. If you want to treat some new options from command line, you should define them before calling the main initialize:
|
|
|
type: textblock
|
|
|
|
The simplest customisation is to define which tags and attributes you want the parser to translate. This should be done in the initialise function. First you should call the main initialise, to get the command-line options, and then, append your custom definitions to the options hash. If you want to handle some new options from the command line, you should define them before calling the main initialise:
|
|
Translated and reviewed by
Robert Readman
|
|
|
|
Located in
lib/Locale/Po4a/Xml.pm:562
|
|
901.
|
|
|
$self->{options}{'new_option'}='';
$self->SUPER::initialize(%options);
$self->{options}{'tags'}.=' <p> <head><title>';
$self->{options}{'attributes'}.=' <p>lang id';
$self->{options}{'inline'}.=' <br>';
$self->treat_options;
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
$self->{options}{'new_option'}='';
$self->SUPER::initialize(%options);
$self->{options}{'tags'}.=' <p> <head><title>';
$self->{options}{'attributes'}.=' <p>lang id';
$self->{options}{'inline'}.=' <br>';
$self->treat_options;
|
|
Translated and reviewed by
Malcolm Parsons
|
|
|
|
Located in
lib/Locale/Po4a/Xml.pm:394
|
|
902.
|
|
|
OVERRIDING THE found_string FUNCTION
|
|
|
type: =head2
|
|
|
|
OVERRIDING THE found_string FUNCTION
|
|
Translated and reviewed by
Malcolm Parsons
|
|
|
|
Located in
lib/Locale/Po4a/Xml.pm:582
|
|
903.
|
|
|
Another simple step is to override the function "found_string", which receives the extracted strings from the parser, in order to translate them. There you can control which strings you want to translate, and perform transformations to them before or after the translation itself.
|
|
|
type: textblock
|
|
|
|
Another simple step is to override the function "found_string", which receives the extracted strings from the parser, in order to translate them. There you can control which strings you want to translate, and perform transformations to them before or after the translation itself.
|
|
Translated and reviewed by
Malcolm Parsons
|
|
|
|
Located in
lib/Locale/Po4a/Xml.pm:584
|