{"id":398,"date":"2015-03-03T10:36:40","date_gmt":"2015-03-03T10:36:40","guid":{"rendered":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/?p=398"},"modified":"2016-04-18T04:52:30","modified_gmt":"2016-04-18T04:52:30","slug":"translations","status":"publish","type":"post","link":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/translations\/","title":{"rendered":"Translations"},"content":{"rendered":"<p>Theme includes bunch of PO translation files for each languages so you can use standard translation tools to help translate theme output strings to your desired language.<\/p>\n<p><strong>WordPress Translation Setting<\/strong><\/p>\n<p>For Pre-Wordpress 4.0 users please follow below steps<\/p>\n<ol>\n<li>Login to your FTP account and edit wp-config.php file.<\/li>\n<li>In\u00a0wp-config.php file, look for WPLANG constant for example <em>define(&#8216;WPLANG&#8217;, &#8221;);<\/em><\/li>\n<li>Define\u00a0WPLANG constant by adding ISO language code of your desired language. For example if you want to add German\u00a0language. Use this code\u00a0<em>define(&#8216;WPLANG&#8217;, &#8216;de_DE.po&#8217;);<\/em><\/li>\n<\/ol>\n<p>For WordPress 4.0 + users\u00a0please follow below steps<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-401\" src=\"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-5.45.48-PM.png\" alt=\"Screen Shot 2558-03-03 at 5.45.48 PM\" width=\"456\" height=\"209\" srcset=\"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-5.45.48-PM.png 456w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-5.45.48-PM-300x138.png 300w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-5.45.48-PM-60x28.png 60w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-5.45.48-PM-150x69.png 150w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/p>\n<ol>\n<li>Login to your WordPress Dashboard and navigate to Settings &gt; General Settings<\/li>\n<li>Make sure &#8220;Site Language&#8221; option is set to your desired language.<\/li>\n<\/ol>\n<p><strong>Storing Translation Files<\/strong><\/p>\n<p>By default storing inside theme folder. The theme language folder is <strong>wp-content\/themes\/grandportfolio\/languages<\/strong> this method has one downside. Because whenevery you update the theme. The whole language folder will be replaced with original version which overwrite your translation files.<\/p>\n<p><strong>NOTE: <\/strong>So the solution is to backup your translation file before updating theme.<\/p>\n<p><strong>Translating The Theme<\/strong><\/p>\n<p>Theme use PO translation file which is industry standard translation method. In theme folder you will find a folder called languages. You will find each languages files store in the folder.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-404\" src=\"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.10.52-PM.png\" alt=\"Screen Shot 2558-03-03 at 6.10.52 PM\" width=\"575\" height=\"557\" srcset=\"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.10.52-PM.png 575w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.10.52-PM-300x291.png 300w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.10.52-PM-60x58.png 60w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.10.52-PM-150x145.png 150w\" sizes=\"(max-width: 575px) 100vw, 575px\" \/><\/p>\n<ul>\n<li><strong>*.po<\/strong> &#8211; A lists of all text strings in theme. The text strings are in English and you can add translation to each of text string.<\/li>\n<li><strong>*.mo<\/strong> &#8211; This is the compiled .po file and is used by WordPress to translate the theme<\/li>\n<\/ul>\n<p>If your language isn&#8217;t included in the theme language files. You have to create a new .po file from original Theme.po located in theme&#8217;s languages folder then save the new .po file with your language code for example\u00a0<em>de_DE.po<\/em><\/p>\n<p><strong>Translating The Custom Post Type Plugin<\/strong><\/p>\n<p>Custom Post Type Plugin\u00a0use PO translation file which is industry standard translation method. In plugins\u00a0folder you will find a folder called languages. You will find each languages files store in the folder.<\/p>\n<p>If your language isn&#8217;t included in the theme language files. You have to create a new .po file from original <strong>grandportfolio-custom-post-en_US.po<\/strong> located in <strong>plugin&#8217;s\u00a0languages folder<\/strong> then save the new .po file with your language code for example <strong>grandportfolio-custom-post-<em>de_DE.po<\/em><\/strong><\/p>\n<p><strong>How to translate Po file using Poedit Application<\/strong><\/p>\n<p>Poedit application is the popular application uses to edit po file translation and it&#8217;s free. <a href=\"http:\/\/poedit.net\/\" target=\"_blank\">Click here to download Poedit application<\/a>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-407\" src=\"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.17.45-PM.png\" alt=\"Screen Shot 2558-03-03 at 6.17.45 PM\" width=\"1042\" height=\"631\" srcset=\"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.17.45-PM.png 1042w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.17.45-PM-300x182.png 300w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.17.45-PM-1024x620.png 1024w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.17.45-PM-60x36.png 60w, https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-content\/uploads\/2015\/03\/Screen-Shot-2558-03-03-at-6.17.45-PM-150x91.png 150w\" sizes=\"(max-width: 1042px) 100vw, 1042px\" \/><\/p>\n<p>Now download and install Poedit application. Open language file you want to translate for example en_US.po You will find all English string\u00a0in Source Text box.<\/p>\n<p>Select text string you want to translate, add your translation text to &#8220;Translation&#8221; field. Once you finish translating. Save the file and it will automatically compiled to .mo file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Theme includes bunch of PO translation files for each languages so you can use standard translation tools to help translate theme output strings to your desired language. WordPress Translation Setting For Pre-Wordpress 4.0 users please follow below steps Login to your FTP account and edit wp-config.php file. In\u00a0wp-config.php file, look for WPLANG constant for example [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[90,89],"_links":{"self":[{"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/posts\/398"}],"collection":[{"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/comments?post=398"}],"version-history":[{"count":11,"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/posts\/398\/revisions"}],"predecessor-version":[{"id":1017,"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/posts\/398\/revisions\/1017"}],"wp:attachment":[{"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/media?parent=398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/categories?post=398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themes.themegoods.com\/grandportfolio\/doc\/wp-json\/wp\/v2\/tags?post=398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}