When your website has multiple languages, you will need to display different forms based on the different languages


If you are using a form published with Custom Liquid, you just need to add some conditional code in the Liquid code.


Sample code:

{% if page.url contains '/en/' %}

form code1

{% else %}

form code2

{% endif %}

The following is an explanation of the sample code:


1. The logic of judging the code is:


When a specific tag exists in a certain URL, execute form code1; otherwise, execute form code2.


2. xxx.url:Select according to the page published by your form.


For example: If your form is published on a page, you need to use "page.url". If your form is published on a products page, you need to use "products.url". And so on.


3. '/xx/':A specific label changes depending on your different languages.


For example:If your language is English, you need to use /en/. If your language is Spanish, you need to use /es/. You should choose based on the specific website address of your website.


4. form code1:Code for form in the corresponding language, selection needs to be made based on the specific tag you choose.


For example:When your tag selection is "/en/", you need to use the code for the English form, and so on.


5. form code2: Form displayed when a certain tag is not included in the URL.