{"id":7423,"date":"2019-10-05T13:19:20","date_gmt":"2019-10-05T07:49:20","guid":{"rendered":"https:\/\/www.hiddentechies.com\/blog\/?p=7423"},"modified":"2019-10-09T10:55:46","modified_gmt":"2019-10-09T05:25:46","slug":"magento2-generate-language-translation-csv","status":"publish","type":"post","link":"https:\/\/www.hiddentechies.com\/blog\/magento-2\/magento2-generate-language-translation-csv\/","title":{"rendered":"Magento2 &#8211; How to Add or Generate Language Translation CSV"},"content":{"rendered":"<p>In this post I am going to explain how to add or generate language translation csv in Magento 2.<\/p>\n<p>In order to add translation csv file in magento2, first you need to create one folder named &#8220;i18n&#8221; inside your module&#8217;s folder.<br \/>\nFor Example, app\/code\/Namespace\/Module\/i18n<\/p>\n<p>Next to that, create a csv file name of language code.<\/p>\n<p>For Example,<\/p>\n<p>English (United state) -&gt; en_US.csv<br \/>\nFrench (France) -&gt; fr_FR.csv<\/p>\n<p>In csv file you need to add words and sentences which you want to translate in following way.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7424\" src=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/translation-csv.png\" alt=\"Magento2 - How to Add or Generate Language Translation CSV\" width=\"957\" height=\"122\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/translation-csv.png 957w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/translation-csv-300x38.png 300w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/translation-csv-768x98.png 768w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2019\/10\/translation-csv-800x102.png 800w\" sizes=\"(max-width: 957px) 100vw, 957px\" \/><\/p>\n<p>You can also generate the translation csv file from command line. Here I have generated from my custom module &#8211; Ht_Mymodule<\/p>\n<pre class=\"lang:default decode:true \">php bin\/magento i18n:collect-phrases --output=\"\/var\/www\/magento2\/app\/code\/Ht\/Mymodule\/i18n\/en_US.csv\" \/var\/www\/magento2\/app\/code\/Ht\/Mymodule<\/pre>\n<p>Now, open the newly generated csv file and add\/edit the words and sentences as per your need.<\/p>\n<p>After done with editing run the static content deploy command.<\/p>\n<pre class=\"lang:default decode:true \">php bin\/magento setup:static-content:deploy -f<\/pre>\n<p>Note: Without running deploy command you can&#8217;t get your localization changes.<\/p>\n<p>Thats it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post I am going to explain how to add or generate language translation csv in Magento 2. In order to add translation csv file in magento2, first you need to create one folder named &#8220;i18n&#8221; inside your module&#8217;s folder. For Example, app\/code\/Namespace\/Module\/i18n Next to that, create a csv file name of language code&#8230;. <\/p>\n<div class=\"actions\"><a href=\"https:\/\/www.hiddentechies.com\/blog\/magento-2\/magento2-generate-language-translation-csv\/\">Continue Reading<\/a><\/div>\n","protected":false},"author":1,"featured_media":7451,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[10,27],"_links":{"self":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7423"}],"collection":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/comments?post=7423"}],"version-history":[{"count":1,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7423\/revisions"}],"predecessor-version":[{"id":7425,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/7423\/revisions\/7425"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media\/7451"}],"wp:attachment":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media?parent=7423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/categories?post=7423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/tags?post=7423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}