The pre-built UI supports multiple languages out of the box. By default, the locale is automatically detected from the user’s browser language settings, falling back to English if the detected language is not supported.
Supported languages
| Language | Locale code |
|---|
| English | en |
| French | fr |
| French (Canadian) | fr-ca |
| German | de |
| Spanish | es |
| Italian | it |
| Dutch | nl |
| Polish | pl |
| Portuguese (Brazilian) | pt-br |
Need a language that isn’t listed? Get in touch and we can work with you to add support for it.
Overriding the locale
You can override the automatic locale detection by including the locale field in the track action request payload.
The locale value will be included in the pre-built UI URL automatically.
This is useful when:
- Your application already knows the user’s preferred language
- You want to ensure a consistent language regardless of the user’s browser settings
const response = await authsignal.track({
userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
action: "signIn",
attributes: {
redirectUrl: "https://yourapp.com/callback",
locale: "es",
},
});
const url = response.url;
var response = await authsignal.Track(new TrackRequest(
UserId: user.Id,
Action: "signIn",
Attributes: new TrackAttributes(
RedirectUrl: "https://yourapp.com/callback",
Locale: "es"
)
));
var url = response.Url;
response = Authsignal.track({
user_id: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
action: "signIn",
attributes: {
redirect_url: "https://yourapp.com/callback",
locale: "es"
}
})
url = response[:url]
response = authsignal.track(
user_id="dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
action="signIn",
attributes={
"redirectUrl": "https://yourapp.com/callback",
"locale": "es"
}
)
url = response["url"]
$response = Authsignal::track([
'userId' => "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
'action' => "signIn",
'attributes' => [
'redirectUrl' => "https://yourapp.com/callback",
'locale' => "es"
]
]);
$url = $response["url"]
response, err := client.Track(
TrackRequest{
UserId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
Action: "signIn",
Attributes: &TrackAttributes{
RedirectUrl: "https://yourapp.com/callback",
Locale: "es",
},
},
)
url := response.Url
The locale field only accepts values from the supported languages list above.
If an unsupported value is provided, it will be ignored and the pre-built UI will fall back to browser-based detection.