> For the complete documentation index, see [llms.txt](https://docs.17movement.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.17movement.net/phone/building-custom-apps/auth/translations-for-auth-views.md).

# TRANSLATIONS FOR AUTH VIEWS

To ensure the new authentication views support multiple languages, you need to define the translation keys for all user-facing text used in `AuthLogin` and `AuthRegister`.

### Defining Keys in Locale File

You must add these translation keys and their corresponding English values to the appropriate locale file, typically `locale/en.lua` (for English).

The format within the `.lua` file is: `["key"] = "value",`

Add the following keys to your `locale/en.lua` file. These keys correspond to the strings used in `Auth.tsx`:

{% tabs %}
{% tab title="locale/en.lua" %}

<pre class="language-lua"><code class="lang-lua"><strong>-- Add these keys to the locale/en.lua file:
</strong>
["Userbar:Title"] = "Welcome",

["Auth:Pages.Login.Title"] = "Login",
["Auth:Pages.Login.Form.Username"] = "Username",
["Auth:Pages.Login.Form.Password"] = "Password",
["Auth:Pages.Login.Form.Button"] = "Login",
["Auth:Pages.Login.Form.NoAccount"] = "Don't have an account?",
["Auth:Pages.Login.Form.NoAccount.Register"] = "Register",

["Auth:Pages.Register.Title"] = "Register",
["Auth:Pages.Register.Form.Username"] = "Username",
["Auth:Pages.Register.Form.Password"] = "Password",
["Auth:Pages.Register.Form.RepeatPassword"] = "Repeat Password",
["Auth:Pages.Register.Form.Button"] = "Register",
["Auth:Pages.Register.Form.HasAccount"] = "Already have an account?",
["Auth:Pages.Register.Form.HasAccount.Login"] = "Login",

["Auth:Errors.Error"] = "An error occurred",
["Auth:Messages.FillAllFields"] = "Please fill in all fields",
["Auth:Messages.AccountCreated"] = "Account created successfully",
["Auth:Messages.InvalidOldPassword"] = "Invalid old password",
["Auth:Messages.InvalidPassword"] = "Invalid password",
["Auth:Messages.InvalidUsernameOrPassword"] = "Invalid username or password",
["Auth:Messages.InvalidUserOrApp"] = "Invalid user ID or app name",
["Auth:Messages.InvalidUser"] = "Invalid user ID",
["Auth:Messages.NoValidUsers"] = "No valid users found",
["Auth:Messages.UsernameExists"] = "Username already exists",
["Auth:Messages.UpdatedSuccessfully"] = "Updated successfully",
["Auth:Messages.AllFieldsRequired"] = "All fields are required",
["Auth:Messages.DifferentPassword"] = "Passwords do not match",
["Auth:Messages.Logout"] = "You have been logged out of the app due to login on another device.",
</code></pre>

{% endtab %}
{% endtabs %}

### Localization for Other Languages

To support other languages, repeat this process by creating or editing the corresponding locale file (e.g., `locale/fr.lua`) and adding the same keys with their appropriate localized values.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.17movement.net/phone/building-custom-apps/auth/translations-for-auth-views.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
