Re: [poedit-users] How to scan HTML files with other keywords?
"Werner F. Bruhin" <[email protected]>
| Newsgroups | gmane.editors.poedit.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Axel,
Axel Wüstemann wrote:
> Michael MH schrieb:
>
>> at the Smarty website I searched for "gettext" and got no results. Maybe
>> that template engine is not well prepared for gettext localization?
>>
>> In general: poedit assist the user in creating a .po/.mo file, which in
>> turn is used by the gettext('keyword') function [included in PHP for
>> example; _('keyword') is a common alias function name] to retrieve the
>> localized term for the current 'keyword'. It does not *translate* any files.
>>
>>
>>> I now changed my templates in several ways:
>>>
>>> <h1>_("Benutzer")</h1>
>>>
>> Almost:
>>
>> <h1><?php echo _("Benutzer"); ?></h1>
>>
>> would allow poedit with correct settings to parse the keyword 'Benutzer'.
>>
>> But again: Without the application being prepared for gettext()
>> localization it is of no use. A search for "smarty gettext" might help you.
>>
>>
> Thank you Michel,
>
> what I want to achieve is, that poEdit collects the string. I extended
> Smarty already for translating the strings and it works fine. But poEdit
> would not find my strings.
>
> Why it must be <h1><?php echo _("Benutzer"); ?></h1> instead of only
> _("Benutzer") that poEdit recognise _("Benutzer") as string to be
> translated?
>
> Next I tried to use a php file strings.php with a list
>
> _("Benutzer")
> _("xxx")
>
I think it should find strings like the above. Maybe you have some
other setting not correctly set.
Have you set the path correctly in Catalog/Settings on the tab "Paths"?
Have you created a parser in File/Preferences along the lines of the one
for e.g. PHP?
Werner
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/