{"id":127,"date":"2020-09-21T18:29:55","date_gmt":"2020-09-21T18:29:55","guid":{"rendered":"https:\/\/docs.softhopper.studio\/anno\/?post_type=ht_kb&#038;p=127"},"modified":"2020-09-21T18:30:32","modified_gmt":"2020-09-21T18:30:32","slug":"translation","status":"publish","type":"ht_kb","link":"https:\/\/docs.softhopper.studio\/anno\/knowledge-base\/translation\/","title":{"rendered":"Translation"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\" id=\"tell-wordpress-which-language-file-to-use\" >Tell WordPress which language file to use.<\/h4>\n\n\n\n<p>If you don\u2019t use WordPress in your native language so far, you have to tell WordPress which language to use to activate the theme translation.<\/p>\n\n\n\n<p>You can do this by editing the wp-config.php file (the file is located in the main directory of your WordPress files) and defining the WPLANG constant. You have to set your language code there, for example, fr_FR for the French translation.<\/p>\n\n\n\n<p>You can do this by editing the wp-config.php file (the file is located in the main directory of your WordPress files) and defining the WPLANG constant. You have to set your language code there, for example, fr_FR for the French translation.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define ('WPLANG', 'fr_FR');<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"first-method-using-loco-or-any-other-translate-plugin\" >First Method: Using Loco or any other Translate Plugin<\/h4>\n\n\n\n<p>The easiest way to translate your theme locally is by using the&nbsp;<a href=\"https:\/\/wordpress.org\/plugins\/loco-translate\/\">Loco Translate<\/a>&nbsp;plugin. After you have installed and activated the plugin, simply Go to Loco Translate &gt; Home in the left-hand menu to start translating. You can get some guideline beginners&nbsp;<a href=\"https:\/\/localise.biz\/wordpress\/plugin\/beginners\">here<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"second-method-using-poedit\" >Second Method: Using Poedit<\/h4>\n\n\n\n<p>Poedit is a common program which you can use to translate the theme. It\u2019s available for free on&nbsp;<a href=\"http:\/\/www.poedit.net\/\">poedit.net<\/a>. After you have installed Poedit, you can open it and select&nbsp;<strong>File &gt; New Catalog from POT file<\/strong>. Then select the .pot file from the theme you wish to translate which you can find in the<strong>&nbsp;\/languages\/&nbsp;<\/strong>folder of the theme. Then go through every line of text and translate it to your native language. Afterwards, you can save the catalogue with your language code (for example&nbsp;<strong>es_ES.po<\/strong>). Normally Poedit automatically creates the .mo file and saves it, too. The last step you have to do is to upload your created language files to the language folder of your theme using FTP.<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht_kb_category":[7],"ht_kb_tag":[],"class_list":["post-127","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-miscellaneous"],"_links":{"self":[{"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":2,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb\/127\/revisions"}],"predecessor-version":[{"id":129,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb\/127\/revisions\/129"}],"wp:attachment":[{"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb_category?post=127"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/docs.softhopper.studio\/anno\/wp-json\/wp\/v2\/ht_kb_tag?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}