Re: [poedit-users] How to scan HTML files with other keywords?
Axel Wüstemann <[email protected]>
| Newsgroups | gmane.editors.poedit.user |
|---|---|
| Organization | qbus | websolutions |
| Message-ID | <[email protected]> |
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")
etc. even that won't work. And this solution would not be so elegant as
I would prefer it. I would appreciate to have a deeper understanding
what xgettext is doing by recognising strings within a source file. The
documentation is not so clear for me at that point.
Thank you
with regards
Axel
-------------------------------------------------------------------------
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/