thank you for the info..
does anyone here know how to test .po and .mo in a theme? I created .po and .mo already but I don’t know how to test it in my theme if it works or not..
thank you for the info..
does anyone here know how to test .po and .mo in a theme? I created .po and .mo already but I don’t know how to test it in my theme if it works or not..thanks
You need to edit your wp-config.php, change the line:
to something like
define('WPLANG', 'sv_SE'); // Swedish locale etc.
just get users to donate theirs, im sure they wont mind in return for a little support and a credit in a txt file
This first step in that explanation is not needed at all and makes the whole thing seem a little more complicated than it is.Next, copy your theme into poedit/bin/ directory.
Don’t do that. Just leave your theme right where it is.
Here’s the steps with some screenshots as I do it.
1) Open the poEdit program, and create a new Catalog.
2) A dialog popup comes up. Enter in your theme info. I usually just put the name of the theme, but you can put as much info as you want.
3) Click the “Paths” tab. Assuming you plan to save this in a folder called “lang” or “language” that’s one level deep in your theme, you’d put in ”../” for the path as I’ve done in the screenshot.
4) Click the “Keywords” tab. You want to put it in just the two gettext elements we use in our WP themes, which I’ve done in the screenshot. ”__” and “_e”
5) So, now you’ve put in your project info, paths, and keywords. Click “okay” and poEdit will show you a save dialog box. Save the file directly in your theme’s “lang” folder (or whatever you called it). When you save it you can name it either theme-name.po or default.po or whatever.po.
Now that you’ve saved it there inside your theme on your computer, poEdit knows to take the relative path you entered in the “Paths” tab previously and apply it relatively to where you just saved the file.
6) Right after you click “Save” poEdit should process for a second and return all the translatable strings from your theme to you like this:
7) Now this is the part I always used to screw up because noone ever told me…
After you’re presented with this screen of all your translatable strings, hit “Save” again.
(The reason for this is because the first time you saved it, you were saving a blank file. Now poEdit has gone through and found all the strings, so you need to save again, or else you will be giving your buyers a blank file.)
I know this is an old thread but any idea here can I get this guide with images?
I have found a nice guide here http://betterwp.net/wordpress-tips/create-pot-file-using-poedit/