{"id":2576,"date":"2016-04-21T09:53:09","date_gmt":"2016-04-21T09:53:09","guid":{"rendered":"https:\/\/themehunk.com\/?post_type=docs&#038;p=2576"},"modified":"2024-07-18T18:42:14","modified_gmt":"2024-07-18T13:12:14","slug":"translate-theme-qtranslate-x","status":"publish","type":"docs","link":"https:\/\/themehunk.com\/fr\/docs\/translate-theme-qtranslate-x\/","title":{"rendered":"Translate your theme with qTranslate-x."},"content":{"rendered":"\n<section class=\"wp-block-group Installing-Plugin has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Installing Plugin<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Translating WordPress site or Translate theme is little difficult for us using .po files. It\u2019s a time-consuming process and not helpful to a newbie who is just started using WordPress. So this blog post will help every user of WordPress to translate their site into easy steps.<br>There are two methods to install a plugin in your dashboard.<br>a. You can directly install a plugin from your dashboard plugin section.<br>For this you need to open your dashboard and select \u201cPlugins &gt; Add New\u201d. Here in search field write \u201cqTranslate-x\u201d and hit \u201cEnter\u201d key.<br><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/1st.png?resize=1343%2C397&#038;ssl=1\" alt=\"1st\" width=\"1343\" height=\"397\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As soon as you hit enter key search will show you a list of plugin, you need to install a very first plugin. Just click \u201cInstall Now\u201d button and then activate it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">b. Or you can download a plugin from https:\/\/www.wordpress.org\/plugins and add a plugin to your \u201cwp-content\/plugins\u201d directory. This will show plugin in your dashboard (Plugins &gt; Installed Plugin) you need to just activate plugin there.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1327\" height=\"602\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/2nd.png?resize=1327%2C602&#038;ssl=1\" alt=\"Translate theme\" class=\"wp-image-2545\" srcset=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/2nd.png?w=1327&amp;ssl=1 1327w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/2nd.png?resize=300%2C136&amp;ssl=1 300w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/2nd.png?resize=768%2C348&amp;ssl=1 768w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/2nd.png?resize=1024%2C465&amp;ssl=1 1024w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n<\/section>\n\n\n\n<section class=\"wp-block-group Enabling-Language has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Enabling Language<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now first process after installing plugin will be to select your languages in which you want to show your website. For this go to \u201cSettings &gt; Languages\u201d. Multiple languages are available; you need to just enable languages.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1347\" height=\"669\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3.png?resize=1347%2C669&#038;ssl=1\" alt=\"3\" class=\"wp-image-512\" srcset=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3.png?w=1347&amp;ssl=1 1347w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3.png?resize=300%2C149&amp;ssl=1 300w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3.png?resize=1024%2C509&amp;ssl=1 1024w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As soon as you select language, it will show in \u201cDefault language\u201d section.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3rd.png?resize=1337%2C520&#038;ssl=1\" alt=\"3rd\" width=\"1337\" height=\"520\"><br>You can also change the order of language by using up and down arrow given besides language.<\/p>\n<\/section>\n\n\n\n<section class=\"wp-block-group Creating-Multilingual-Posts has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Creating Multilingual Posts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To create multilingual post go to \u201cPosts &gt; Add New\u201d, Here you will get two title field both for \u201cEnglish\u201d and for \u201cDeutsch\u201d. It is because we have selected only two language.<br>And in post editor section you will get two tabs one for \u201cEnglish\u201d and another for \u201cDeutsch\u201d.<br>You need to write title and content of a post in both the language. The best way to write it in both the language is to first convert all text using \u201cGoogle Translator\u201d and then paste it in your editor.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1326\" height=\"590\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/4th.png?resize=1326%2C590&#038;ssl=1\" alt=\"4th\" class=\"wp-image-2550\" srcset=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/4th.png?w=1326&amp;ssl=1 1326w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/4th.png?resize=300%2C133&amp;ssl=1 300w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/4th.png?resize=768%2C342&amp;ssl=1 768w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/4th.png?resize=1024%2C456&amp;ssl=1 1024w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1343\" height=\"586\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/5th.png?resize=1343%2C586&#038;ssl=1\" alt=\"5th\" class=\"wp-image-2551\" srcset=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/5th.png?w=1343&amp;ssl=1 1343w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/5th.png?resize=300%2C131&amp;ssl=1 300w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/5th.png?resize=768%2C335&amp;ssl=1 768w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/5th.png?resize=1024%2C447&amp;ssl=1 1024w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After completing process hit \u201cPublish button\u201d. Here is the result<br><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/1-1.png?resize=1256%2C381&#038;ssl=1\" alt=\"1\" width=\"1256\" height=\"381\"><br><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/2-1.png?resize=1262%2C378&#038;ssl=1\" alt=\"2\" width=\"1262\" height=\"378\"><\/p>\n<\/section>\n\n\n\n<section class=\"wp-block-group Creating-Multilingual-Pages has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Creating Multilingual Pages<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Creating multiple language pages is similar just as creating a post. Create a new page and fill the respective field.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1343\" height=\"554\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page1.png?resize=1343%2C554&#038;ssl=1\" alt=\"page1\" class=\"wp-image-2554\" srcset=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page1.png?w=1343&amp;ssl=1 1343w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page1.png?resize=300%2C124&amp;ssl=1 300w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page1.png?resize=768%2C317&amp;ssl=1 768w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page1.png?resize=1024%2C422&amp;ssl=1 1024w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1342\" height=\"590\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page2.png?resize=1342%2C590&#038;ssl=1\" alt=\"page2\" class=\"wp-image-2555\" srcset=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page2.png?w=1342&amp;ssl=1 1342w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page2.png?resize=300%2C132&amp;ssl=1 300w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page2.png?resize=768%2C338&amp;ssl=1 768w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/page2.png?resize=1024%2C450&amp;ssl=1 1024w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n<\/section>\n\n\n\n<section class=\"wp-block-group Translating-Theme has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Translating Theme by Customizer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before translating theme you need to know about code line. This will help you to write content in all language<br>&lt;!-\u2013: en\u2013-&gt; Your text goes here&lt;!\u2013-:\u2013-&gt; or [: , en]Your text goes here[:]<br>Above line will define that the text given is English te because in a code we have written \u201cen\u201d which specifies that this is English language text.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Likewise, you can write text for Deutsch also, you just need to change the code of language. For example<br>&lt;!-\u2013:de\u2013-&gt;Your text goes here&lt;!\u2013-:\u2013-&gt; or [:de]Deutsch Text[:]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here \u201cde\u201d is Deutsch language code.<br>You can get list of code from this link : https:\/\/www.w3.org\/WAI\/ER\/IG\/ert\/iso639.htm#2letter<br><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/custom-code.png?resize=296%2C431&#038;ssl=1\" alt=\"custom-code\" width=\"296\" height=\"431\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Like wide you can use these codes to translate each section text.<br>Using PHP code to translate:<br>To translate text in PHP file you need to add code in PHP format. Please check the code below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;?php _e(\u201c&lt;!\u2013-:en-\u2013&gt;English text&lt;!-\u2013:\u2013-&gt;&lt;!-\u2013:de-\u2013&gt;Deutsch text&lt;!-\u2013:-\u2013&gt;\u201d); ?&gt;<br>Complete format should be used in php<br>file, then it will translate text in correct way.<\/p>\n<\/section>\n\n\n\n<section class=\"wp-block-group Adding-widget has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">Adding Widget in Theme<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As soon as plugin is activated it gives a widget in \u201cWidgets\u201d section, you can add it in Footer area where user can click on language to translate website in selected language.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1011\" height=\"493\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3-2.png?resize=1011%2C493&#038;ssl=1\" alt=\"3\" class=\"wp-image-2569\" srcset=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3-2.png?w=1011&amp;ssl=1 1011w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3-2.png?resize=300%2C146&amp;ssl=1 300w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/3-2.png?resize=768%2C375&amp;ssl=1 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There you will get multiple options to be selected.<br>Here we have selected \u201cText and Image\u201d this will show the result as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"501\" src=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/9.png?resize=1344%2C501&#038;ssl=1\" alt=\"9\" class=\"wp-image-522\" srcset=\"https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/9.png?w=1344&amp;ssl=1 1344w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/9.png?resize=300%2C112&amp;ssl=1 300w, https:\/\/i0.wp.com\/themehunk.com\/wp-content\/uploads\/2015\/05\/9.png?resize=1024%2C382&amp;ssl=1 1024w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now you need to just click on language name. This will change language of a site to selected language.<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Installing Plugin Translating WordPress site or Translate theme is little difficult for us using .po files. It\u2019s a time-consuming process and not helpful to a newbie who is just started using WordPress. So this blog post will help every user of WordPress to translate their site into easy steps.There are two methods to install a [&hellip;]<\/p>\n","protected":false},"author":6713,"featured_media":0,"template":"","meta":{"footnotes":""},"class_list":["post-2576","docs","type-docs","status-publish","hentry","docscate-documentation","docstag-post","docstag-site","docstag-theme","docstag-wordpress"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/themehunk.com\/fr\/wp-json\/wp\/v2\/docs\/2576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themehunk.com\/fr\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/themehunk.com\/fr\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/themehunk.com\/fr\/wp-json\/wp\/v2\/users\/6713"}],"version-history":[{"count":8,"href":"https:\/\/themehunk.com\/fr\/wp-json\/wp\/v2\/docs\/2576\/revisions"}],"predecessor-version":[{"id":70215,"href":"https:\/\/themehunk.com\/fr\/wp-json\/wp\/v2\/docs\/2576\/revisions\/70215"}],"wp:attachment":[{"href":"https:\/\/themehunk.com\/fr\/wp-json\/wp\/v2\/media?parent=2576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}