{"id":126,"date":"2015-11-24T12:49:13","date_gmt":"2015-11-24T12:49:13","guid":{"rendered":"http:\/\/zozothemes.com\/wp\/metal\/documentation\/?page_id=126"},"modified":"2016-06-22T09:56:54","modified_gmt":"2016-06-22T09:56:54","slug":"language-translation","status":"publish","type":"page","link":"https:\/\/docs.zozothemes.com\/aven\/faq\/language-translation\/","title":{"rendered":"Language Translation"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row center_row=&#8221;yes&#8221; css=&#8221;.vc_custom_1460960875811{padding-bottom: 60px !important;}&#8221;][vc_column][zozo_vc_section_title text_align=&#8221;left&#8221; title=&#8221;Translate Your Theme &#8211; Basics&#8221; title_transform=&#8221;capitalize&#8221;][\/zozo_vc_section_title][vc_column_text]<\/p>\n<ul>\n<li>Login to your FTP account and edit the wp-config.php file<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>In the wp-config.php file, look for WPLANG constant which looks like: define(\u2018WPLANG\u2019,\u201d); or that constant is not available in the wp-config.php file, you need to add it anywhere in a new line in this file.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>Define the WPLANG constructor by adding the ISO Language code of your language. The names consist of locals, a combination of language and regional dialect. For example, if you were translating to Deutsch language, change the WPLANG constant to look like the following code: define(\u2018WPLANG\u2019, \u2018de_DE\u2019);<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>After the wp-config.php file is edited, login to WP-admin dashboard and navigate to the Settings tab, then to the General Settings page.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>In the General Settings page, make sure the Site Language field is set to your desired language.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li><strong>Note:<\/strong> First 2 characters of a language code define the Language, the last 2 characters define the Country. Click here for more information on the ISO Language Codes.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_single_image image=&#8221;2268&#8243; img_size=&#8221;full&#8221; onclick=&#8221;link_image&#8221;][vc_separator css=&#8221;.vc_custom_1448347815938{padding-top: 20px !important;}&#8221;][\/vc_column][\/vc_row][vc_row center_row=&#8221;yes&#8221; css=&#8221;.vc_custom_1448347933185{padding-top: 0px !important;padding-bottom: 60px !important;}&#8221;][vc_column][zozo_vc_section_title text_align=&#8221;left&#8221; title=&#8221;Storing Translation Files&#8221; title_transform=&#8221;capitalize&#8221;]Storing translation files in the right directory is very important to make sure the translations you\u2019ve downloaded, created or edited. The best way to do this is store it inside the Languages folder located inside the wp-content folder.[\/zozo_vc_section_title][vc_row_inner][vc_column_inner][vc_column_text]<\/p>\n<h4>To Store Theme Translation Files<\/h4>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>Place your theme translation files inside <span class=\"highlight\">wp-content\/languages\/themes folder.<\/span> If you don\u2019t have the languages and themes folder, simply create the languages folder, and the themes folder inside it.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>Updating the theme will not overwrite the wp-content folder. Storing your translation files here will ensure they stay intact during updates.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li><span class=\"highlight\">When storing your language files, remember that the file structure is different and must include the theme name, as well. For example, if the language files are in the Deutsch language, the file names would be <span class=\"highlight\">zozothemes-de_DE.mo<\/span> and <span class=\"highlight\">zozothemes-de_DE.po.<\/span><\/span><\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_separator css=&#8221;.vc_custom_1448347815938{padding-top: 20px !important;}&#8221;][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row][vc_row center_row=&#8221;yes&#8221; css=&#8221;.vc_custom_1448347933185{padding-top: 0px !important;padding-bottom: 60px !important;}&#8221;][vc_column][zozo_vc_section_title text_align=&#8221;left&#8221; title=&#8221;The Translation Process&#8221; title_transform=&#8221;capitalize&#8221;]This section will explain where you can find the files needed for translation and what these files are for. Inside Our Main Theme folder, you will find a folder called Languages. If you have downloaded the Installable WordPress Package file, you will find these files in the Languages folder:[\/zozo_vc_section_title][vc_row_inner][vc_column_inner][vc_column_text]<strong>zozothemes.pot<\/strong> \u2013 A list of all the text strings used in the Theme files. These text strings are in the English language, and can contain a translation for each text string.[\/vc_column_text][vc_column_text]If your language is not already included, you need to <strong>create a new .po<\/strong> file from the original <strong>zozothemes.pot<\/strong> located in the Languages folder, translate all text strings, then <strong>save the .po<\/strong> file with your language code.[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>Either you are setting up a completely <strong>new language file<\/strong> or you just want to edit translated pre-built language files, follow the steps to make easy.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>The language files can also be used if you only want to translate a small portion of the theme, or one specific area. You do not have to translate the entire theme, you can choose what you translate inside the <strong>zozothemes.pot file<\/strong>. This is the preferred method for translation.<\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][vc_separator css=&#8221;.vc_custom_1448347815938{padding-top: 20px !important;}&#8221;][\/vc_column][\/vc_row][vc_row center_row=&#8221;yes&#8221; css=&#8221;.vc_custom_1448347933185{padding-top: 0px !important;padding-bottom: 60px !important;}&#8221;][vc_column][zozo_vc_section_title text_align=&#8221;left&#8221; title=&#8221;Edit The .pot file Using POEdit Software&#8221; title_transform=&#8221;capitalize&#8221;]To edit the .pot files, you need to download the POEdit software. Click on this link to download poedit.net. There are different editors for editing .po files, but <a href=\"http:\/\/poedit.net\/\" target=\"_blank\">poedit.net<\/a> is easy to use, it is available for all platforms and it is freeware.[\/zozo_vc_section_title][vc_row_inner][vc_column_inner width=&#8221;7\/12&#8243;][vc_column_text]<\/p>\n<ul>\n<li>Open <strong>POEdit <\/strong> and select the <strong>Create New Translation<\/strong> button to open the zozothemes.pot.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>Once it has loaded, You will find all English text strings in the left column called Source Text. Once you add translations, they will show up in the right column under Translation.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>Choose the line you want to translate. In the lower right section of the <strong>POEdit window<\/strong>, you will find a text area where you can add the correct translation.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>When you are <strong><span class=\"highlight\">done translating<\/span><\/strong> all the needed text strings into your desired language, <strong><span class=\"highlight\">save the file<\/span><\/strong> with the theme name and your language code.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>For example, if you were translating to the Deutsch language, you would save it as <strong>de_DE.po<\/strong>. The corresponding <strong>.mo file<\/strong> will be auto created.<\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column_inner][vc_column_inner width=&#8221;5\/12&#8243;][vc_single_image image=&#8221;303&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; css=&#8221;.vc_custom_1449137154957{border-top-width: 1px !important;border-right-width: 1px !important;border-bottom-width: 1px !important;border-left-width: 1px !important;border-left-color: #e1e1e1 !important;border-left-style: solid !important;border-right-color: #e1e1e1 !important;border-right-style: solid !important;border-top-color: #e1e1e1 !important;border-top-style: solid !important;border-bottom-color: #e1e1e1 !important;border-bottom-style: solid !important;}&#8221;][\/vc_column_inner][\/vc_row_inner][vc_row_inner][vc_column_inner][vc_single_image image=&#8221;304&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; onclick=&#8221;link_image&#8221;][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row][vc_row center_row=&#8221;yes&#8221; css=&#8221;.vc_custom_1448347933185{padding-top: 0px !important;padding-bottom: 60px !important;}&#8221;][vc_column][zozo_vc_section_title text_align=&#8221;left&#8221; title=&#8221;To Edit A Pre-Built Language File&#8221; title_transform=&#8221;capitalize&#8221;]Everytime you update the <strong>.pot file<\/strong>, make sure to upload both .po and the compiled .mo file as correct file name. The correct file name is the theme name and your language code. For example, de_DE.po.[\/zozo_vc_section_title][vc_row_inner][vc_column_inner width=&#8221;1\/2&#8243;][vc_column_text]<\/p>\n<ul>\n<li>Open the <strong>.pot<\/strong> file of your preferred language in POEdit and search for the line you want to change. Select the Edit button to change, then select the Find option.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>In the Search Window, <strong>type the text<\/strong> string you are searching. Once it is selected, replace the text in the Translation text area in the lower part of the window with your prefered translation.<\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>Repeat the steps to <strong>edit another text.<\/strong><\/li>\n<\/ul>\n<p>[\/vc_column_text][vc_column_text]<\/p>\n<ul>\n<li>Once done with your translations, Save the file and <strong>.mo file<\/strong> will be auto created with updated.<\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column_inner][vc_column_inner width=&#8221;1\/2&#8243;][vc_single_image image=&#8221;305&#8243; img_size=&#8221;full&#8221; alignment=&#8221;center&#8221; css=&#8221;.vc_custom_1449137473445{border-top-width: 1px !important;border-right-width: 1px !important;border-bottom-width: 1px !important;border-left-width: 1px !important;border-left-color: #e1e1e1 !important;border-left-style: solid !important;border-right-color: #e1e1e1 !important;border-right-style: solid !important;border-top-color: #e1e1e1 !important;border-top-style: solid !important;border-bottom-color: #e1e1e1 !important;border-bottom-style: solid !important;}&#8221;][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row center_row=&#8221;yes&#8221; css=&#8221;.vc_custom_1460960875811{padding-bottom: 60px !important;}&#8221;][vc_column][zozo_vc_section_title text_align=&#8221;left&#8221; title=&#8221;Translate Your Theme &#8211; Basics&#8221; title_transform=&#8221;capitalize&#8221;][\/zozo_vc_section_title][vc_column_text] Login to your FTP account and edit the wp-config.php file [\/vc_column_text][vc_column_text] In the wp-config.php file, look for WPLANG&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":768,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-fullwidth.php","meta":{"footnotes":""},"class_list":["post-126","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/docs.zozothemes.com\/aven\/wp-json\/wp\/v2\/pages\/126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.zozothemes.com\/aven\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.zozothemes.com\/aven\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.zozothemes.com\/aven\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.zozothemes.com\/aven\/wp-json\/wp\/v2\/comments?post=126"}],"version-history":[{"count":0,"href":"https:\/\/docs.zozothemes.com\/aven\/wp-json\/wp\/v2\/pages\/126\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/docs.zozothemes.com\/aven\/wp-json\/wp\/v2\/pages\/768"}],"wp:attachment":[{"href":"https:\/\/docs.zozothemes.com\/aven\/wp-json\/wp\/v2\/media?parent=126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}