📜 ⬆️ ⬇️

Question: gettext and keys in Cyrillic

In the wake of the topic:
http://habrahabr.ru/blogs/zend_framework/64115/

The author very successfully uses the keys in Cyrillic, for example:
_ ('Home Page'), _ ('Add User')

I would very much like to know: what methods are used to scan source files and recognize keys in Cyrillic.

')
In the case of using poedit (http://www.poedit.net/) and native gettext (http://sourceforge.net/projects/gettext)
when trying to scan keys in Cyrillic, we get the error:
image

Is there a way out of this situation?
Agree, it is inconvenient, having a site, for example, in Russian and Chinese, to use English for keys.

Update:
Thanksgiving prompts fatum and stfalcon, found the cause. The encoding of the scanned source files should be indicated. In the parser settings poedit. (File-> Settings-> Parsers-> PHP).

There is a small caveat here, if you set the encoding as expected:
image
Will not work.

It is necessary to completely replace the variable% C with the value: --from-code = utf-8
image

Thanks for helping me figure it out.

Source: https://habr.com/ru/post/64177/


All Articles