1179 posts
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 200 and 499 users
  • Has been a member for 6-7 years
mabuc says

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

1 post
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 1 and 9 users
  • Sweden
designpalatset says

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:

define('WPLANG', '');

to something like

define('WPLANG', 'sv_SE'); // Swedish locale etc.
FirestormGraphics
FirestormGraphics Recent Posts Threads Started
38 posts
  • United Kingdom
  • Has been a member for 3-4 years
  • Bought between 1 and 9 items
  • Exclusive Author
FirestormGraphics says

just get users to donate theirs, im sure they wont mind in return for a little support and a credit in a txt file :)

2177 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred between 200 and 499 users
  • Has been a member for 5-6 years
  • Won a Competition
+10 more
mpc Volunteer moderator says

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? :)

2177 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred between 200 and 499 users
  • Has been a member for 5-6 years
  • Won a Competition
+10 more
mpc Volunteer moderator says
1 post
  • Has been a member for 1-2 years
VaneEssa says

I have been working with this localization tool which I recommend to you for wordpress: https://poeditor.com/ and it really does a great job. It support a large number of translators on the same project, working on different languages. There are also plenty of features that ease the work. It has API, a wordpress plugin and github integration also.

by
by
by
by
by
by