{"id":439811,"date":"2024-05-14T12:00:41","date_gmt":"2024-05-14T12:00:41","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=439811"},"modified":"2024-05-14T12:00:41","modified_gmt":"2024-05-14T12:00:41","slug":"create-a-multilanguage-file-upload-field-in-the-prestashop","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/","title":{"rendered":"Create a Multilanguage file upload field in the PrestaShop"},"content":{"rendered":"\n<p>In this blog, we are going to learn how to create a multilanguage file upload field in the HelperForm Class of PrestaShop.<\/p>\n\n\n\n<p>So let\u2019s see together how to do that with PrestaShop.<\/p>\n\n\n\n<p>Sometimes, we need to upload files language-wise in the module. <\/p>\n\n\n\n<p>We will add the file upload field to the module configuration page using the <strong>renderForm<\/strong> function.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">public function renderForm()\n    {\n        $fields_form = &#091;\n            &#039;form&#039; =&gt; &#091;\n                &#039;legend&#039; =&gt; &#091;\n                    &#039;title&#039; =&gt; $this-&gt;l(&#039;Settings&#039;),\n                    &#039;icon&#039; =&gt; &#039;icon-cogs&#039;,\n                ],\n                &#039;input&#039; =&gt; &#091;\n                    &#091;\n                        &#039;type&#039; =&gt; &#039;file_lang&#039;,\n                        &#039;label&#039; =&gt; $this-&gt;l(&#039;Multilang image&#039;),\n                        &#039;name&#039; =&gt; &#039;WK_MULTILANG_IMG&#039;,\n                        &#039;lang&#039; =&gt; true,\n                    ]\n                ],\n                &#039;submit&#039; =&gt; &#091;\n                    &#039;title&#039; =&gt; $this-&gt;l(&#039;Save&#039;),\n                ],\n            ],\n        ];\n\n        $lang = new Language((int) Configuration::get(&#039;PS_LANG_DEFAULT&#039;));\n\n        $helper = new HelperForm();\n        $helper-&gt;show_toolbar = false;\n        $helper-&gt;table = $this-&gt;table;\n        $helper-&gt;default_form_language = $lang-&gt;id;\n        $helper-&gt;module = $this;\n        $helper-&gt;allow_employee_form_lang = Configuration::get(&#039;PS_BO_ALLOW_EMPLOYEE_FORM_LANG&#039;) ? Configuration::get(&#039;PS_BO_ALLOW_EMPLOYEE_FORM_LANG&#039;) : 0;\n        $helper-&gt;identifier = $this-&gt;identifier;\n        $helper-&gt;submit_action = &#039;submitStoreConf&#039;;\n        $helper-&gt;currentIndex = $this-&gt;context-&gt;link-&gt;getAdminLink(&#039;AdminModules&#039;, false) . &#039;&amp;configure=&#039; . $this-&gt;name . &#039;&amp;tab_module=&#039; . $this-&gt;tab . &#039;&amp;module_name=&#039; . $this-&gt;name;\n        $helper-&gt;token = Tools::getAdminTokenLite(&#039;AdminModules&#039;);\n        $helper-&gt;tpl_vars = &#091;\n            &#039;uri&#039; =&gt; $this-&gt;getPathUri(),\n            &#039;fields_value&#039; =&gt; $this-&gt;getConfigFieldsValues(),\n            &#039;languages&#039; =&gt; $this-&gt;context-&gt;controller-&gt;getLanguages(),\n            &#039;id_language&#039; =&gt; $this-&gt;context-&gt;language-&gt;id,\n        ];\n\n        return $helper-&gt;generateForm(&#091;$fields_form]);\n    }<\/pre>\n\n\n\n<p>In the above code, we used the file type field and <strong>&#8216;type&#8217; =&gt; &#8216;file_lang&#8217;<\/strong> instead of <strong>&#8216;type&#8217; =&gt; &#8216;file&#8217;<\/strong> and added<strong> <\/strong>new<strong> <\/strong>params<strong> &#8216;lang&#8217; =&gt; true<\/strong> for multilanguage.<\/p>\n\n\n\n<p>The rest code is the same as we used for form creation.<\/p>\n\n\n\n<p>Now we will create form.tpl file on the below path <\/p>\n\n\n\n<p>module_name\/views\/templates\/admin\/_configure\/helpers\/form\/<\/p>\n\n\n\n<p>We have overridden the form.tpl file using our module and use the below code in the form.tpl file<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\"> {extends file=&quot;helpers\/form\/form.tpl&quot;}\n {block name=&quot;field&quot;}\n     {if $input.type == &#039;file_lang&#039;}\n         &lt;div class=&quot;col-lg-8&quot;&gt;\n             {foreach from=$languages item=language}\n                 {if $languages|count &gt; 1}\n                     &lt;div class=&quot;translatable-field lang-{$language.id_lang}&quot; {if $language.id_lang != $defaultFormLanguage}style=&quot;display:none&quot;{\/if}&gt;\n                 {\/if}\n                 &lt;div class=&quot;form-group&quot;&gt;\n                     &lt;div class=&quot;col-lg-6&quot;&gt;\n                         &lt;input id=&quot;{$input.name}_{$language.id_lang}&quot; type=&quot;file&quot; name=&quot;{$input.name}_{$language.id_lang}&quot; class=&quot;hide&quot; \/&gt;\n                         &lt;div class=&quot;dummyfile input-group&quot;&gt;\n                             &lt;span class=&quot;input-group-addon&quot;&gt;&lt;i class=&quot;icon-file&quot;&gt;&lt;\/i&gt;&lt;\/span&gt;\n                             &lt;input id=&quot;{$input.name}_{$language.id_lang}-name&quot; type=&quot;text&quot; class=&quot;disabled&quot; name=&quot;filename&quot; readonly \/&gt;\n                             &lt;span class=&quot;input-group-btn&quot;&gt;\n                                 &lt;button id=&quot;{$input.name}_{$language.id_lang}-selectbutton&quot; type=&quot;button&quot; name=&quot;submitAddAttachments&quot; class=&quot;btn btn-default&quot;&gt;\n                                     &lt;i class=&quot;icon-folder-open&quot;&gt;&lt;\/i&gt; {l s=&#039;Choose a file&#039; mod=&#039;wkmultilangfile&#039;}\n                                 &lt;\/button&gt;\n                             &lt;\/span&gt;\n                         &lt;\/div&gt;\n                     &lt;\/div&gt;\n                     {if $languages|count &gt; 1}\n                         &lt;div class=&quot;col-lg-2&quot;&gt;\n                             &lt;button type=&quot;button&quot; class=&quot;btn btn-default dropdown-toggle&quot; tabindex=&quot;-1&quot; data-toggle=&quot;dropdown&quot;&gt;\n                                 {$language.iso_code}\n                                 &lt;span class=&quot;caret&quot;&gt;&lt;\/span&gt;\n                             &lt;\/button&gt;\n                             &lt;ul class=&quot;dropdown-menu&quot;&gt;\n                                 {foreach from=$languages item=lang}\n                                 &lt;li&gt;&lt;a href=&quot;javascript:hideOtherLanguage({$lang.id_lang});&quot; id=&quot;dropdown-lang-item-link-{$lang.id_lang}&quot; tabindex=&quot;-1&quot;&gt;{$lang.name}&lt;\/a&gt;&lt;\/li&gt;\n                                 {\/foreach}\n                             &lt;\/ul&gt;\n                         &lt;\/div&gt;\n                     {\/if}\n                 &lt;\/div&gt;\n                 &lt;div class=&quot;form-group&quot;&gt;\n                     {if isset($fields_value&#091;$input.name]&#091;$language.id_lang]) &amp;&amp; $fields_value&#091;$input.name]&#091;$language.id_lang] != &#039;&#039;}\n                     &lt;div id=&quot;{$input.name}-{$language.id_lang}-images-thumbnails&quot; class=&quot;col-lg-12&quot;&gt;\n                         &lt;img src=&quot;{$uri}img\/{$fields_value&#091;$input.name]&#091;$language.id_lang]}&quot; class=&quot;img-thumbnail&quot;\/&gt;\n                     &lt;\/div&gt;\n                     {\/if}\n                 &lt;\/div&gt;\n                 {if $languages|count &gt; 1}\n                     &lt;\/div&gt;\n                 {\/if}\n                 &lt;script&gt;\n                 $(document).ready(function(){\n                     $(&#039;#{$input.name}_{$language.id_lang}-selectbutton&#039;).click(function(e){\n                         $(&#039;#{$input.name}_{$language.id_lang}&#039;).trigger(&#039;click&#039;);\n                     });\n                     $(&#039;#{$input.name}_{$language.id_lang}&#039;).change(function(e){\n                         var val = $(this).val();\n                         var file = val.split(\/&#091;\\\\\/]\/);\n                         $(&#039;#{$input.name}_{$language.id_lang}-name&#039;).val(file&#091;file.length-1]);\n                     });\n                 });\n             &lt;\/script&gt;\n             {\/foreach}\n             {if isset($input.desc) &amp;&amp; !empty($input.desc)}\n                 &lt;p class=&quot;help-block&quot;&gt;\n                     {$input.desc}\n                 &lt;\/p&gt;\n             {\/if}\n         &lt;\/div&gt;\n     {else}\n         {$smarty.block.parent}\n     {\/if}\n {\/block}<\/pre>\n\n\n\n<p>In the above code, we extended the helper form <strong>tpl<\/strong> and overridden the field block.<\/p>\n\n\n\n<p>we have checked the if condition for the file_lang type field and wrote the multilanguage field code and in the else part return the parent field block for other fields.<\/p>\n\n\n\n<p>Now file upload field will appear language-wise.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"382\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-1200x382.webp\" alt=\"Image with multi language\" class=\"wp-image-440063\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-1200x382.webp 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-300x95.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-250x80.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-768x244.webp 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang.webp 1304w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now we will save the images language-wise using the code below.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">public function postProcess()\n    {\n        if (Tools::isSubmit(&#039;submitStoreConf&#039;)) {\n            $languages = Language::getLanguages(false);\n            $values = &#091;];\n            $update_images_values = false;\n\n            foreach ($languages as $lang) {\n                if (isset($_FILES&#091;&#039;WK_MULTILANG_IMG_&#039; . $lang&#091;&#039;id_lang&#039;]])\n                    &amp;&amp; isset($_FILES&#091;&#039;WK_MULTILANG_IMG_&#039; . $lang&#091;&#039;id_lang&#039;]]&#091;&#039;tmp_name&#039;])\n                    &amp;&amp; !empty($_FILES&#091;&#039;WK_MULTILANG_IMG_&#039; . $lang&#091;&#039;id_lang&#039;]]&#091;&#039;tmp_name&#039;])) {\n                    if ($error = ImageManager::validateUpload($_FILES&#091;&#039;WK_MULTILANG_IMG_&#039; . $lang&#091;&#039;id_lang&#039;]], 4000000)) {\n                        return $this-&gt;displayError($error);\n                    } else {\n                        $ext = substr($_FILES&#091;&#039;WK_MULTILANG_IMG_&#039; . $lang&#091;&#039;id_lang&#039;]]&#091;&#039;name&#039;], strrpos($_FILES&#091;&#039;WK_MULTILANG_IMG_&#039; . $lang&#091;&#039;id_lang&#039;]]&#091;&#039;name&#039;], &#039;.&#039;) + 1);\n                        $file_name = md5($_FILES&#091;&#039;WK_MULTILANG_IMG_&#039; . $lang&#091;&#039;id_lang&#039;]]&#091;&#039;name&#039;]) . &#039;.&#039; . $ext;\n\n                        if (!move_uploaded_file($_FILES&#091;&#039;WK_MULTILANG_IMG_&#039; . $lang&#091;&#039;id_lang&#039;]]&#091;&#039;tmp_name&#039;], dirname(__FILE__) . DIRECTORY_SEPARATOR . &#039;img&#039; . DIRECTORY_SEPARATOR . $file_name)) {\n                            return $this-&gt;displayError($this-&gt;l(&#039;An error occurred while attempting to upload the file.&#039;));\n                        } else {\n                            if (Configuration::hasContext(&#039;WK_MULTILANG_IMG&#039;, $lang&#091;&#039;id_lang&#039;], Shop::getContext())\n                                &amp;&amp; Configuration::get(&#039;WK_MULTILANG_IMG&#039;, $lang&#091;&#039;id_lang&#039;]) != $file_name) {\n                                @unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . &#039;img&#039; . DIRECTORY_SEPARATOR . Configuration::get(&#039;WK_MULTILANG_IMG&#039;, $lang&#091;&#039;id_lang&#039;]));\n                            }\n\n                            $values&#091;&#039;WK_MULTILANG_IMG&#039;]&#091;$lang&#091;&#039;id_lang&#039;]] = $file_name;\n                        }\n                    }\n\n                    $update_images_values = true;\n                }\n            }\n\n            if ($update_images_values &amp;&amp; isset($values&#091;&#039;WK_MULTILANG_IMG&#039;])) {\n                Configuration::updateValue(&#039;WK_MULTILANG_IMG&#039;, $values&#091;&#039;WK_MULTILANG_IMG&#039;]);\n            }\n\n            return $this-&gt;displayConfirmation($this-&gt;l(&#039;The settings have been updated.&#039;));\n        }\n\n        return &#039;&#039;;\n    }<\/pre>\n\n\n\n<p>Here we did it on the configuration page. <\/p>\n\n\n\n<p>We can do the same step for the admin controller form.<\/p>\n\n\n\n<p>That\u2019s all about this blog. Hope it will help you.<\/p>\n\n\n\n<p>If you are facing any issues or doubts in the above process, please feel free to contact us in the comment section.<\/p>\n\n\n\n<p>We would be happy to help.<\/p>\n\n\n\n<p>Also, you can explore our&nbsp;<a href=\"https:\/\/webkul.com\/prestashop-development\/\">PrestaShop Development Services<\/a>&nbsp;&amp; a large range of quality&nbsp;<a href=\"https:\/\/store.webkul.com\/PrestaShop-Extensions.html\">PrestaShop Modules<\/a>.<\/p>\n\n\n\n<p>For any doubt contact us at&nbsp;<a href=\"mailto:support@webkul.com\">support@webkul.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we are going to learn how to create a multilanguage file upload field in the HelperForm Class of PrestaShop. So let\u2019s see together how to do that with PrestaShop. Sometimes, we need to upload files language-wise in the module. We will add the file upload field to the module configuration page using <a href=\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":416,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[209,1],"tags":[3888,1063],"class_list":["post-439811","post","type-post","status-publish","format-standard","hentry","category-prestashop","category-uncategorized","tag-file-upload","tag-multilanguage"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create a Multilanguage file upload field in the PrestaShop - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a Multilanguage file upload field in the PrestaShop - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this blog, we are going to learn how to create a multilanguage file upload field in the HelperForm Class of PrestaShop. So let\u2019s see together how to do that with PrestaShop. Sometimes, we need to upload files language-wise in the module. We will add the file upload field to the module configuration page using [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-14T12:00:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-1200x382.webp\" \/>\n<meta name=\"author\" content=\"Gajendra Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gajendra Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/\"},\"author\":{\"name\":\"Gajendra Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/ba72ea261f883808a566a3ab8b63dede\"},\"headline\":\"Create a Multilanguage file upload field in the PrestaShop\",\"datePublished\":\"2024-05-14T12:00:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/\"},\"wordCount\":299,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-1200x382.webp\",\"keywords\":[\"file upload\",\"multilanguage\"],\"articleSection\":[\"prestashop\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/\",\"url\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/\",\"name\":\"Create a Multilanguage file upload field in the PrestaShop - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-1200x382.webp\",\"datePublished\":\"2024-05-14T12:00:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang.webp\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang.webp\",\"width\":1304,\"height\":415},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a Multilanguage file upload field in the PrestaShop\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/ba72ea261f883808a566a3ab8b63dede\",\"name\":\"Gajendra Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9d864b4124944a25bce60168e4d9520c03a18cdca40483dfbf0d9e46d2f0d32c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9d864b4124944a25bce60168e4d9520c03a18cdca40483dfbf0d9e46d2f0d32c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Gajendra Singh\"},\"description\":\"Gajendra Singh, a PrestaShop Software Engineer, excels in Mobile App and Custom Extension Development. A tech-savvy expert in Docker and POS, he creates innovative solutions. Gajendra's skills ensure a seamless PrestaShop experience, catering to diverse needs.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/gajendra-singh681\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create a Multilanguage file upload field in the PrestaShop - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/","og_locale":"en_US","og_type":"article","og_title":"Create a Multilanguage file upload field in the PrestaShop - Webkul Blog","og_description":"In this blog, we are going to learn how to create a multilanguage file upload field in the HelperForm Class of PrestaShop. So let\u2019s see together how to do that with PrestaShop. Sometimes, we need to upload files language-wise in the module. We will add the file upload field to the module configuration page using [...]","og_url":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2024-05-14T12:00:41+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-1200x382.webp","type":"","width":"","height":""}],"author":"Gajendra Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Gajendra Singh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/"},"author":{"name":"Gajendra Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/ba72ea261f883808a566a3ab8b63dede"},"headline":"Create a Multilanguage file upload field in the PrestaShop","datePublished":"2024-05-14T12:00:41+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/"},"wordCount":299,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-1200x382.webp","keywords":["file upload","multilanguage"],"articleSection":["prestashop"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/","url":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/","name":"Create a Multilanguage file upload field in the PrestaShop - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang-1200x382.webp","datePublished":"2024-05-14T12:00:41+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang.webp","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2024\/05\/filemultilang.webp","width":1304,"height":415},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/create-a-multilanguage-file-upload-field-in-the-prestashop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create a Multilanguage file upload field in the PrestaShop"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/ba72ea261f883808a566a3ab8b63dede","name":"Gajendra Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9d864b4124944a25bce60168e4d9520c03a18cdca40483dfbf0d9e46d2f0d32c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9d864b4124944a25bce60168e4d9520c03a18cdca40483dfbf0d9e46d2f0d32c?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Gajendra Singh"},"description":"Gajendra Singh, a PrestaShop Software Engineer, excels in Mobile App and Custom Extension Development. A tech-savvy expert in Docker and POS, he creates innovative solutions. Gajendra's skills ensure a seamless PrestaShop experience, catering to diverse needs.","url":"https:\/\/webkul.com\/blog\/author\/gajendra-singh681\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/439811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/416"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=439811"}],"version-history":[{"count":9,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/439811\/revisions"}],"predecessor-version":[{"id":440925,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/439811\/revisions\/440925"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=439811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=439811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=439811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}