Localizing Social Login Button Text in FusionAuth Themes
-
Our users sign in via Google or Apple accounts. While testing internationalization, we noticed that the social login button text doesn’t change with the selected language. Is there a way to localize the social login buttons for different languages in FusionAuth?
-
Yes, you can localize social login buttons, but it requires customizing your theme.
In the Theme Helpers file, locate the macro for each IdP button—for example, the Google button macro (starting around line 409). Change the text like this:
From:
<div class="text">${identityProvider.lookupButtonText(clientId)?trim}</div>
To:
<div class="text">${theme.message('google-login')}</div>
Then, define google-login in your Theme → Messages bundles for each supported language. Repeat the same process for the Apple button macro (starting around line 363).
This allows the social login button text to display localized strings based on the user’s selected language.