RE: [poedit-users] poEdit and PHP
"Patrakelis" <[email protected]>
| Newsgroups | gmane.editors.poedit.user |
|---|---|
| Message-ID | <[email protected]> |
Hi I understand, that 'poEdit' is 'for_editing_*.PO' :-))) But my idea is to use all that good functional stuff, included in, such as fussytranslation and esspecially Translations Memory, and, of course, a lot of .PO files... Also I don't like the idea to study all day about 'what_is_gettext_how_it_works'. I tried IniTranslator, but it corrupts .PHP files, and dont has all_that_good_stuff. > Patrakelis wrote: > > did anybody succed to use poEdit for translating PHP files with > > format: 'Word' => 'Translation', > I'm not sure what you mean, but I suspect it's something that has > little if anything to do with gettext (which is the system for which > poedit is an editor). Have a look here: > > http://www.gnu.org/software/gettext/manual/html_chapter/gettext_toc.html Thanks for that, Also thanks to Villas page: http://musica.educar.pro.br/count/po.php Also Villas findings: http://doku.wordpress.de/Erstellen_der_Sprachdatei_mit_poEdit where I found German description and translated to English with http://www.translate.ru/text.asp#tr_form: ////////////// start of PROMT translation ////////////// Schritt 2: Konfiguration von poEdit.... Step 2: Configuration from poEdit. [work on] General program settings So that poEdit functions for our purposes properly, we must carry out first of all a few settings, so that the program goes through later the right files with the right Parser. Therefore, we start poEdit and call the program settings (file> settings). Now on the first register map you put down your given name and surname. On the editor-register map you remove the little minced meat before the option CR/LF conversion> format of existing category maintains. Then you change on the card index map Parser and click on new. Now in the fields you put down from above down PHP *.php xgettext --output=%o %K --language=php %F --keyword=%k %f The last field remains free. Now you click twice on OK. With it is poEdit ready for parsen from PHP files. (The described settings orientate themselves by him Default (http://wiki.wordpress.org/?pagename=POTscript) from Ryan Boren. //To understand explanation of the Parsereinstellungen This segment is relatively heavy if one has not perused yet the whole document... I am nobody gettext an expert. But what I could make sense with the help of the gettext documentation (in poEdit help> GNU gettext documentation), is the following: xgettext --output=%o %K --language=php %F xgettext (the program which accomplishes the whole mopo-Miracle) is called normally with " xgettext input file ". Input file is substituted from poEdit with the place holder %F (and can probably be also a list). Then poEdit goes the lists, them in the catalog options (s.u). were selected, by, and parst all files which agree with the file endings (in our case only *.php) . The parameter - output fixes where the po file is stored. The parameter will hand over xgettext from poEdit about the place holder %o and contains the place which you give with the storage of the catalog (s.u.). - language parameter brags what Parser xgettext to parsen should use (here php). %K substituted - keyword = % k, and %k substitutes for the key words (s.u.) or functional names from which xgettext the string should export. Written out is called xgettext from poEdit as follows: xgettext --output=wp/de_DE.po --keyword=__ --keyword=_e --language=*.php wp/. And this is more or less that what does Ryan in his Script. The parameter/j which appears in Ryans Script is suspended from poEdit probably for every list, and gets to club together xgettext the different po files for every single list. [work on] //Arrangements of the catalog management The catalog management serves to assign the linguistic files projects and (what a surprise) to administer. We put on for WordPress now a translation project. In addition öffnst you the catalog management (file> catalog management) and click on the left Buchicon. As a name you fix, e.g., "WordPress". Then you click on the left Icon in the area of Lists (that with a|e) and changes the existing path on C:\xampp\htdocs. (Should no path be still given, you click on the second Icon from the left.) the button "Searching" helps to you if necessary In it on the right below in the window. Then you close the project manager again. All preparations would be concluded with it. Step 3: the .pot file provide Now you provide the .pot file for WordPress. * In addition you click on file> new catalog. * in the opening window catalog options you give the following: ////////////// end of PROMT translation ////////////// > > It does not open PHP file, also I can't find Import feature. > > Uh, what import feature? There's no such thing, no wonder you can't > find it. OK, let's say I'm dumb. But please explain, what for is : File > Preferences > Parsers > PHP? Help says, that: Parsers (Warning: for experienced users only!) Most importantly, you can edit source code parsers in this dialog. Parsers are used when updating catalogs in poEdit (see Updating Catalog) and they take care of extracting strings from source code. By default only C and C++ programming languages are supported (through gettext xgettext utility). The dialog for editing parsers explains in detail how to fill in required information -- if in doubt, refer to C/C++ parser which may serve as a complex example of parser definition. Thanks for Your patiency PS -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.7 - Release Date: 2005.02.10 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click