I’m using the JavaScript SDK to embed forms on a webapp.
All the forms have English texts by default and French-Canadian text as translations.
In the init function, I specify the language I want the form to show, either en-US or fr-CA.
I observed that when Feathery’s SDK makes the HTTP request to load the form, that request has a header Accept-Language with the language I specified,
but it also includes a list of languages that my device support.
The issue I observed is that when the list languages include a language that has a translation, it will use that language, even though it’s not the first on the list.
I tried the following options, en-US, en, en-CA and default, to have the SDK to load the default (english) language, but it does work.
For example, my phone is in English, but has French-Canadian as a second language. In the init function, when I specify en-US,
I can see that the SDK is using en-US,fr-CA in the Accept-Language header.
The HTTP request that loads the form is ignoring en-US and loads the French translations.
The correct way here to set the language in the JS embed would be just the 2 letter code ‘en’.
The 2 letter codes here would be the form languages while the rest are from your device languages.
Is the issue only isolated on your Ionic/CapacitorJS app, or does it also load the language wrongly for a regular webpage embed (desktop and mobile) ?
Yes, when it’s running locally, it’s like any webapp.
The forms are not accessible directly, you need an account and go through a complex process.
I could create a special version and host it somewhere. But I can’t share the link publicly. I will email it to you once it’s ready.