Question

How do i use Poedit to read strings embedded in __(). It's a Cakephp .ctp file. At the moment it only works if i remove one underscore: _(). I know how to use the console but i want to use Poedit.

Was it helpful?

Solution

Catalog -> Properties -> Source keywords and add __, because unlike _ it is not xgettext's default.

Just guessing, BTW, because your question leaves a lot to be desired in terms of usable details.

OTHER TIPS

Read the books page about i18n & i10n.

You have to use the shell to generate the catalogue files and you open these files with poedit not your template files. That's how it works.

Have a read how gettext works. Translating something is more than just replacing a string...

So to make it easier if you can't have your ctpo file parsed by poedit.

Open poedit, in the "files" => "preferences" check the extractors tabs, choose php for modification, add *.ctp to the extension lists.

Save and update your list, translations from ctp files should be there now.

Enjoy !

You should indeed use your console to generate a pot file but, for example, i'm working on a project where everything is online on a mutualised server, i don't have access to any console.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top