Adapt Copy With Translations
The SDK allows you to customize almost all of the text it displays. You do so using the âlocaleâ prop on the DynamicContextProvider.
In this short guide we will update some text and along the way, learn how to format the value that locale expects!
Letâs imagine we want to change the âSelect your walletâ text in the image below to âFind your favouriteâ
We simply need to inspect that element in the browser, and find the key that is being used to display that text by checking the copykey
attribute on that element. In this case, youâll see that it is âdyn_login.title.all_wallet_listâ.
Now weâll create our locale object, and add a new key with that value. It always starts with a key of the language youâre editing, in this case âenâ for English. Then we add the key that we found in the browser, and then the value we want to replace it with.
const locale = {
en: {
dyn_login: {
title: {
all_wallet_list: "Select your wallet",
},
},
},
};
Weâre now ready to pass our locale object to the DynamicContextProvider like so:
<DynamicContextProvider settings={settings_go_here} locale={locale}>
<App />
</DynamicContextProvider>
Thatâs it! You can now customize the text in the SDK to your heartâs content. Note that if you ever want to see the full list of possible keys, .
Was this page helpful?