{"id":57487,"date":"2015-11-18T06:59:58","date_gmt":"2015-11-18T11:59:58","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=57487"},"modified":"2016-02-24T06:12:41","modified_gmt":"2016-02-24T11:12:41","slug":"cherryframework-4-how-to-add-localization-for-a-plugin","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/cherryframework-4-how-to-add-localization-for-a-plugin.html","title":{"rendered":"CherryFramework 4. How to add localization for a plugin"},"content":{"rendered":"<p>\r\n<p>This tutorial is going to show you how to add a localization for plugins using a WordPress CherryFramework 4 template.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=KYNxejotpvo?width=1280&amp;height=720\" rel=\"prettyPhoto\">CherryFramework 4. How to add localization for a plugin<\/a><\/p>\r\n<p>In order to add a localization for a plugin, you need to perform the following:<\/p>\r\n<ol>\r\n<li>\r\n<p>Go to <a href=\"http:\/\/poedit.net\/download\" rel=\"nofollow\">http:\/\/poedit.net\/download<\/a> and download <strong>Poedit<\/strong> for your system (Windows\/MAC). <strong>Poedit<\/strong> is a free, open source and cross-platform gettext catalog (.po file) editor to aid in the process of language localization:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-1-300x169.jpg\" alt=\"CherryFramework_4._How_to_add_a_localization_for_a_plugin-1\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-57488\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-1-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-1-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-1-1024x576.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-1.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>Install it on your computer: double click the file and follow the steps it suggests. At the end of the installation make sure the option <strong>Open Poedit After Installation<\/strong> is checked and click <strong>Finish<\/strong>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-2-300x234.jpg\" alt=\"CherryFramework_4._How_to_add_a_localization_for_a_plugin-2\" width=\"300\" height=\"234\" class=\"aligncenter size-medium wp-image-57489\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-2-300x234.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-2-150x117.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-2.jpg 508w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>Go to the <strong>\/wp-content\/plugins<\/strong> directory. There you&#8217;ll see plugins folders:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-3-300x169.jpg\" alt=\"CherryFramework_4._How_to_add_a_localization_for_a_plugin-3\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-57490\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-3-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-3-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-3-1024x576.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-3.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>Each of the plugins folders has a <strong>languages<\/strong> folder, which contains a blank <strong>POT<\/strong> file that can be used to create a localization for the plugin. Some plugins already have localizations for several languages:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-4-300x169.jpg\" alt=\"CherryFramework_4._How_to_add_a_localization_for_a_plugin-4\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-57491\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-4-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-4-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-4-1024x576.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-4.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>In order to add a new localization, you need to download the <strong>POT<\/strong> file to your local system and open it in <strong>Poedit<\/strong> by selecting in the main menu <strong>File -> New from POT\/PO file&#8230;<\/strong>. When you do that, you&#8217;ll get to a dialogue box that says <strong>Translation Language<\/strong>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-5.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-5-300x245.jpg\" alt=\"CherryFramework_4._How_to_add_a_localization_for_a_plugin-5\" width=\"300\" height=\"245\" class=\"aligncenter size-medium wp-image-57492\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-5-300x245.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-5-150x123.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-5.jpg 992w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>There you need to select the language you are going to add.<\/p>\r\n<\/li>\r\n<li>\r\n<p>You need to make a translation for each string by writing it in the <strong>Translation<\/strong> field. Also, you can translate only those of them that need to be rewritten:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-6.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-6-300x245.jpg\" alt=\"CherryFramework_4._How_to_add_a_localization_for_a_plugin-6\" width=\"300\" height=\"245\" class=\"aligncenter size-medium wp-image-57493\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-6-300x245.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-6-150x122.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-6.jpg 996w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<li>\r\n<p>After all is done, go to <strong>File \/ Save<\/strong> or press <strong>Ctrl + S<\/strong> and save the localization. You&#8217;ll get two files with the extensions <strong>*.po<\/strong> and <strong>*.mo<\/strong>. You need to name them <strong>plugin_name-ln_LN<\/strong>, where <strong>ln_LN<\/strong> is the locale international code of the language and <strong>plugin_name<\/strong> is the name of the plugin you&#8217;re making translations for.<\/p>\r\n<\/li>\r\n<li>\r\n<p>The <strong>PO\/MO<\/strong> localization files that you created should be uploaded to the <strong>wp-content\/languages\/plugins<\/strong> folder. If the folder doesn&#8217;t exist, please create it.<\/p>\r\n<\/li>\r\n<li>\r\n<p>The last step is to go to <strong>Dashboard &#8211; Settings &#8211; General<\/strong> and switch the <strong>Site Language<\/strong>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-7.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-7-300x169.jpg\" alt=\"CherryFramework_4._How_to_add_a_localization_for_a_plugin-7\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-57494\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-7-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-7-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-7-1024x576.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/11\/CherryFramework_4._How_to_add_a_localization_for_a_plugin-7.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=KYNxejotpvo?width=1280&amp;height=720\" rel=\"prettyPhoto\">CherryFramework 4. How to add localization for a plugin<\/a><\/p>\r\n<\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial is going to show you how to add localization for plugins using a WordPress CherryFramework 4 template.<\/p>\n","protected":false},"author":85,"featured_media":57497,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2017,728],"tags":[2012,702,768],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/57487"}],"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\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=57487"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/57487\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/57497"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=57487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=57487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=57487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}