Hello everyone.
I have a website with 3.0.18 VirtueMart. I Use 4 languages. For products I use custom field to show pdf.
Right now i set pdf in english for description of product.
I want to ask if I am able to set a different pdf (different language) for other languages, and how to make that.
Thanks, Matevz
Quote from: matevzp2 on September 22, 2016, 12:33:49 PM
Hello everyone.
I have a website with 3.0.18 VirtueMart. I Use 4 languages. For products I use custom field to show pdf.
Right now i set pdf in english for description of product.
I want to ask if I am able to set a different pdf (different language) for other languages, and how to make that.
Thanks, Matevz
Hello,
I think you should create an plugin to do this, if not please email me baoquocmt159@gmail.com i can help you.
Thank you !
how about name each pdf
pdf1_en-gb.pdf
pdf1_it-it.pdf etc
in the custom field write pdf_xxxxx.pdf
and in the template do a str_replace for the xxxx with the current lang code when u display the custom field
Haven't tried it but sounds like this plugin should do what you need http://extensions.virtuemart.net/products/multilingual-translatable-custom-fields-detail.
Quote from: GJC Web Design on September 26, 2016, 12:48:08 PM
how about name each pdf
pdf1_en-gb.pdf
pdf1_it-it.pdf etc
in the custom field write pdf_xxxxx.pdf
and in the template do a str_replace for the xxxx with the current lang code when u display the custom field
Hi, can you please repeat me instructions what i need to do in template because i didnt understand everything.
Thanks
in the template detect the current lang code
in the display of the custom field do a str replace of the xxx for the lang code
http://www.w3schools.com/php/func_string_str_replace.asp