How to change the account sign in language in Hydrogen?

Is there a way to change the Log in title text in the account log in / sign up screen? To my understanding it could be done through the locales files, however, I do not know what the key name would be to target it.

An example of the text can be seen in the image below.

Hi Stewart,

You should simply need to update the login method in your login route to include the uiLocales option:

export async function loader({request, context}: LoaderFunctionArgs) {
  return context.customerAccount.login({
    uiLocales: 'FR',
  });
}

In order to make it dynamic, just add the locale to the context inside server.ts, then use the locale inside the login method via the context.

Note, at the moment only these languages are supported: Customer Account API reference

In the future I think this is something that we could automatically do for you when passing the locale to createHydrogenContext.

Hey Bret. Than you for the quick response. I should have clarified, I don’t want to change the language, I want to change the Text from Log in to Log in or Sign up. Is that possible?

Sorry Stewart, that is not supported at this time.

1 Like

Thank you! I should have asked days ago, would have saves so much time.