{"id":28942,"date":"2013-05-09T08:23:06","date_gmt":"2013-05-09T12:23:06","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=28942"},"modified":"2016-02-24T05:10:43","modified_gmt":"2016-02-24T10:10:43","slug":"wordpress-how-to-add-theme-localization","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-how-to-add-theme-localization.html","title":{"rendered":"WordPress. How to add theme localization"},"content":{"rendered":"<p>\r\n<\/p>\r\n<p>The following tutorial is going to show you how to add WordPress theme localization (translate a theme).<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=Dsjpmq58pCY?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to add theme localization<\/a><\/p>\r\n<p>1. Here you can see the content of typical WordPress theme<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress1.jpg\" alt=\"\" title=\"how_to_add_theme_localization_in_WordPress1\" width=\"236\" height=\"216\" class=\"alignnone size-full wp-image-28943\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress1.jpg 236w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress1-150x137.jpg 150w\" sizes=\"(max-width: 236px) 100vw, 236px\" \/><\/a><\/p>\r\n<p>2. Unzip <strong>themeXXXX.zip<\/strong> (where XXXX is the number of your theme).<\/p>\r\n<p>3. Navigate to <strong>themeXXXX\/languages<\/strong> folder. There you will see <strong>en_EN.mo<\/strong> and <strong>en_EN.po<\/strong> files.<\/p>\r\n<p>4. We will edit <strong>PO<\/strong> file using <strong>PO editor<\/strong>. We will us <strong>Poedit<\/strong>. You can download it at <a target=\"_blank\" href=\"http:\/\/www.poedit.net\/download.php\">http:\/\/www.poedit.net\/download.php<\/a><\/p>\r\n<p>5. Open <strong>en_EN.po<\/strong> file using <strong>Poedit<\/strong><\/p>\r\n<p>6. Navigate to <strong>Catalog<\/strong> menu and open <strong>Properties<\/strong>.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress2-300x252.jpg\" alt=\"\" title=\"how_to_add_theme_localization_in_WordPress2\" width=\"300\" height=\"252\" class=\"alignnone size-medium wp-image-28944\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress2-300x252.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress2-150x126.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress2.jpg 794w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>7. Change <strong>Project name and version<\/strong> field value to your theme name. <strong>themeXXXX<\/strong> in our case.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress3-300x256.jpg\" alt=\"\" title=\"how_to_add_theme_localization_in_WordPress3\" width=\"300\" height=\"256\" class=\"alignnone size-medium wp-image-28945\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress3-300x256.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress3-150x128.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress3.jpg 527w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>8. Click OK to save the changes.<\/p>\r\n<p>9. Select <strong>File -> Save as<\/strong> and save the file using your locale name. E.g.: ru_RU.po for Russian locale, es_ES.po for Spanish locale, fr_FR.po for French locale etc.<\/p>\r\n<p>10. Select a line in Poedit and type in translation to <strong>Translation<\/strong> field at the bottom<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress4-300x252.jpg\" alt=\"\" title=\"how_to_add_theme_localization_in_WordPress4\" width=\"300\" height=\"252\" class=\"alignnone size-medium wp-image-28946\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress4-300x252.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress4-150x126.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress4.jpg 795w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>11. Hit <strong>Ctrl + Return<\/strong> on your keyboard to save translation and go to next line.<\/p>\r\n<p>12. Click <strong>Save<\/strong> button when you done translating. <strong>ru_RU.mo<\/strong> file will be created in the same folder <strong>ru_RU.po<\/strong> file is located.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress5.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress5-300x252.jpg\" alt=\"\" title=\"how_to_add_theme_localization_in_WordPress5\" width=\"300\" height=\"252\" class=\"alignnone size-medium wp-image-28947\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress5-300x252.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress5-150x126.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2013\/04\/how_to_add_theme_localization_in_WordPress5.jpg 795w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>13. Copy <strong>ru_Ru.mo<\/strong> file to <strong>\/wp-content\/themes\/themeXXXX\/languages<\/strong> folder on your FTP.<\/p>\r\n<p>14. Navigate to root WordPress folder on your FTP and edit <strong>wp-config.php<\/strong> file.<\/p>\r\n<p>15. Search for <strong>define(&#8216;WPLANG&#8217;, &#8221;);<\/strong> and change its second argument to your locale (ru_RU in our example)<\/p>\r\n<pre class=\"brush:php\">define('WPLANG', 'ru_RU');<\/pre>\r\n<\/p>\r\n<p>16. Save the file.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=Dsjpmq58pCY?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to add theme localization<\/a><\/p>\r\n<p>\r\n<\/p>\r\n<\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>The following tutorial is going to show you how to add WordPress theme localization (translate a theme).<\/p>\n","protected":false},"author":38,"featured_media":28952,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[1158,702,766,1511,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/28942"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=28942"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/28942\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/28952"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=28942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=28942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=28942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}