Re: [poedit-users] How to scan HTML files with other keywords?
Michael MH <[email protected]>
| Newsgroups | gmane.editors.poedit.user |
|---|---|
| Message-ID | <[email protected]> |
Am 30.06.2007 23:00, Axel Wüstemann schrieb/wrote:
>> I suggest you start by reading the included Gettext docs, then realize
>> that xgettext (which you probably left as the scanner executable)
>> really cannot automagically understand the weird syntax of yours.
>> Then you have two options: either change your templates to conform to
>> the way Gettext works and work with xgettext, or write your own
>> scanner that will handle this syntax.
>>
> The ## markers were working well with Smarty...
Axel,
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.
- Michael
-------------------------------------------------------------------------
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/