Ruben
Ruben

Reputation: 9186

Add language string wordpress

I use the _e('Read more') function in Wordpress. But how can I add a translation string? Like if I want _e('Read more') -> translated to dutch = 'Lees dit artikel verder'.

Also how can I set the current frontend language programatically? Because I embedded wp to my site and I can check what language I'm in and set it correct.

Thanks

Upvotes: 0

Views: 2659

Answers (1)

Austin
Austin

Reputation: 475

In short, you'll want to create a POT file of all the translatable strings, use that to create a PO file of original/translated strings, and use that to create a MO file (binary version of the PO file).

Localization is a somewhat complicated subject and is addressed in part in the official WordPress documentation: http://codex.wordpress.org/Translating_WordPress

This blog post is more straightforward in some ways, but not as comprehensive: http://www.forumone.com/blogs/post/translating-your-wordpress-site-using-pot-file

Upvotes: 1

Related Questions