poedit

php string variables in gettext

旧巷老猫 提交于 2019-12-19 10:14:35
问题 How does gettext translate string variables? It doesn't seem to want to do it.. lets say I have $sentence = "Hello World"; and then I want to echo ($sentence); ... how can I do that so that I can translate what's inside $sentence in Poedit?I can use -> echo sprintf( ("%s test"), $sentence) and this will print "Hello World test" in the browser but it will appear as "%s test" in Poedit and I won't get the translated version of Hello World inside of Poedit. So how can I use string variables

What good alternatives to poEdit are there? [closed]

痞子三分冷 提交于 2019-12-17 17:28:47
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm looking for a .po/.mo editor. I am using gettext for the translation files but don't really like poEdit. It has to run on Windows Vista and it would be even better if it was built into Visual Studio 2008 so I could develop and translate I really want something that helps me translate and makes translation

Scan html files in poedit

杀马特。学长 韩版系。学妹 提交于 2019-12-13 23:55:50
问题 Hello I want scan html files in Poedit to translate the text there. I have code in html file like this: <a href="/test">_("translate me")</a> and I want the Poedit scan the word translate me like he scan PHP file without using PHP codes only pure html. Please give me helpful answer. I really stuck I can't translate my template. I tried to add .html , .htm in Poedit preferences and actually it does not read my words, I asked Poedit service center in email and they give me a "shift for oneself"

.po file for default cakephp libs translations

本小妞迷上赌 提交于 2019-12-12 18:26:21
问题 How to add the translations for cakephp libs files to by default.po file for example - months name - day's name - timeAgoInWords i try to add strings to default.po manually but everytime i update it from default.pot (using poedit) the strings are gone. please help me to solve it it will fine to find solution by using separate .po file 回答1: i solve it - create /app/views/dummy.ctp - duplicate by coping the translation from cake\libs\view\helpers\time.ctp to dummy.ctp - and cake i18n will add

PoEdit keywords - plurals

删除回忆录丶 提交于 2019-12-12 08:44:11
问题 I incorporated a gettext-like localization system in my app, but my translation function looks like this: t($category, $string, [$plural_string, $number, $vprintf_arguments]) My PoEdit keywords: t:2 t:2,3 t:2 tells PoEdit to parse $string , and it works apparently t:2,3 should tell PoEdit to parse both $string and $plural_string - but it's not :( It only sees $string , so I don't get the plural forms parsed... How can I fix that? I don't want to switch my function to a different argument

poedit doesn't recognize _x

雨燕双飞 提交于 2019-12-12 01:59:27
问题 My .po file contains: "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;" "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" And my php/wordpress code contains: _x( 'Add New', $this->post_type , $domain ), I know that Poedit is scanning that file (all the other translatable strings are picked up on "update catalog", and share the same domain). And if I change _x to __

How to read __() in Cakephp .ctp files with poedit?

只愿长相守 提交于 2019-12-11 22:17:09
问题 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. 回答1: 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. 回答2: Read the books page about i18n & i10n. You have to use the shell to generate the catalogue

What is the recomended way / best practice to Poedit translate strings without a source keyword?

时光怂恿深爱的人放手 提交于 2019-12-11 06:44:25
问题 I'm developing a Zend Framework 2 application an having a problem with translations. Actually in the view scripts a can use the view helper Translate. Since I defined "translate" as a source keyword in Poedit ( [Poedit menu] -> Catalogue -> Properties... -> Source keywords ) the strings are identified by the tool and added to the tranlation list. But there are also some strings at other places, where I cannot use the/a view helper, e.g. in form classes or in the navigation. How should this be

php string variables in gettext (forgot one case scenario)

北城以北 提交于 2019-12-11 04:49:00
问题 I've posted a question yesterday but I just realized that the answer doesn't seem to be working for a certain situation. The post was php string variables in gettext and here is what I asked about: Hello, How does gettext translate string variables? It doesn't seem to want to do it.. lets say I have $sentence = "Hello World"; and then I want to echo ($sentence); ... how can I do that so that I can translate what's inside $sentence in Poedit?I can use -> echo sprintf(("%s test"), $sentence)

How to set gettext text domain in Poedit?

余生颓废 提交于 2019-12-10 15:47:29
问题 I need to parse my php files where is used several text-domains. I want to parse just one specific domain (others have been already translated) How to make Poedit to do that? Is it required to compile mo file bounded to some text-domain? If it is, how to do it in Poedit. I am using windows and do not want to install Cigwin with Gettext. Thanks for any help. 回答1: You don't need install Cygwin for gettext, because there is ready to use gettext for windows: http://gnuwin32.sourceforge.net