Skip to main content
All CollectionsWorkaroundsWorkarounds for the Donation Box
Define the Language for a Donation Box Embedded into your Website
Define the Language for a Donation Box Embedded into your Website

Learn how to force a determined language into your Embedded Donation Box.

Davide Ferrari avatar
Written by Davide Ferrari
Updated over a year ago


❗️Please keep in mind that this workaround requires implementation from your IT department or someone with technical knowledge.

1. Default Language of the Donation Box

👉 In case you haven't configured your Donation Box yet, we advise you to check our article on how to set up the Donation Box before you implement this workaround.

The Donation Box is by default in the language in which you have your StockCrowd account (Spanish or English).

However, if you embed the Donation Box on your website, you will not see the option to change the language as you do when using a full-page Campaign.

We advise you to make sure that the Donation Box matches the language of your website.

To do so, you have to add parameters in the Campaign's HTML, to force the Donation box to display the language of your choice.

2. How to Change the Language of an Embedded Donation Box?

Once you have configured your Donation Box, and have copied the HTML code, you will see a code structured as follows:

<!-- Iframe to start the payment process -->
<iframe id="sc Iframe" title="Payment form" scrolling="no" src="https://www.stockcrowd.com/payment-1df5f37d-82d5-423d-b73e-32be7d309879?style=peer&lang=en" allow="payment *" style="border:0px; width: 100%;"></iframe>
<!-- Add code in the Javascript -->
<script id="integrationJs" type="text/javascript" src="https://www.stockcrowd.com/resources/js/templates/payment/dp/integracion-embeded.js"></script>

The HTML code is formed by 2 parts: (i) <iframe> and (ii) <script>.

The <iframe id> is in the first part, where you will add the parameter for the language you choose.

2.1. Find the URL of the Donation Box in the HTML script

Within that line of code, you'll find in "src" the URL to the Donation Box of the Campaign, as in the example below:

"src="https://www.stockcrowd.com/payment-1df5f37d-82d5-423d-b73e-32be7d309879?style=peer&lang=en"

2.2. Find the Language Parameter in the URL

In the last part of the URL, you will see the language parameter, formed as in:

src="https://www.stockcrowd.com/payment-1df5f37d-82d5-423d-b73e-32be7d309879? (link to the Donation Box) + style=peer (style of the Donation Box) + &lang=en (language parameter)

The language of the Donation box in this case is in English (en), as the parameter is formed by "&lang=en":

& (after the link) + lang (short for language) + = + en (parameter for desired language)

2.3. Change the Language Parameter in the URL

You need to change the last part of this parameter to force the language of your choice.

Here are some examples of common languages used:

LANGUAGE

PARAMETER

HTML CODE

Spanish

es

&lang=es

Catalan

ca

&lang=ca

English

en

&lang=en

Italian

it

&lang=it

Portuguese

pt

&lang=pt

French

fr

&lang=fr

👉 If you can't find the language you're looking for, you can also consult this website to read more about other language codes.

Therefore, if you want to change the language to Italian, your code should look as follows:

As a result, the Donation Box would be displayed in the language you defined in the parameters.

Did this answer your question?