keycloak/js/apps/account-ui
Hosted Weblate 8e7a1ed136
Updated translation for Czech
Language: cs

Updated translation for Czech

Language: cs

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Peter Schiffer <peter@pschiffer.eu>
Signed-off-by: Hosted Weblate <hosted@weblate.org>
Signed-off-by: Peter Schiffer <peter@pschiffer.eu>
2026-04-08 02:45:22 +02:00
..
maven-resources Implementing locale based theme-description translation 2026-04-02 11:40:45 +02:00
maven-resources-community/theme/keycloak.v3/account/messages Updated translation for Czech 2026-04-08 02:45:22 +02:00
public added organizations table to account (#32311) 2024-08-22 15:44:03 -03:00
src removed static reference to i18n and environment (#46315) 2026-03-16 18:12:28 +01:00
test Fix/issue 46081 fetch with error throwing network error (#47597) 2026-04-01 12:53:25 +02:00
.gitignore Fix broken localization tests on Firefox (#41324) 2025-07-22 12:11:23 +00:00
package.json Bump vite from 7.3.0 to 7.3.2 in /js (#47785) 2026-04-07 15:58:30 +02:00
playwright.config.ts Isolate account console tests on a per-realm basis (#41608) 2025-08-12 07:43:21 -04:00
pom.xml Update custom Maven build cache configuration for js directory 2024-12-10 10:07:02 +00:00
README.md Replace i18next backend with i18next-fetch-backend (#37633) 2025-02-26 08:36:12 -05:00
tsconfig.json Move root PNPM workspace to js directory (#35456) 2024-11-29 17:20:32 +01:00
vite.config.ts small fix for library mode (#30645) 2024-06-21 09:48:55 +00:00

Keycloak Account UI

This project is the next generation of the Keycloak Account UI. It is written with React and PatternFly and uses Vite.

Features

Contains all the "pages" from the account-ui as re-usable components, all the functions to save and the side menu to use in your own build of the account-ui

Install

npm i @keycloak/keycloak-account-ui

Usage

To use these pages you'll need to add KeycloakProvider in your component hierarchy to setup what client, realm and url to use.

import { KeycloakProvider } from "@keycloak/keycloak-ui-shared";

//...

<KeycloakProvider environment={{
      serverBaseUrl: "http://localhost:8080",
      realm: "master",
      clientId: "security-admin-console"
  }}>
  {/* rest of you application */}
</KeycloakProvider>

Translation

For the translation we use react-i18next you can set it up as described on their website. If you want to use the translations that are provided then you need to add i18next-fetch-backend to your project and add:


backend: {
  loadPath: `http://localhost:8180/resources/master/account/{{lng}}`,
  parse: (data: string) => {
    const messages = JSON.parse(data);

    return Object.fromEntries(
      messages.map(({ key, value }) => [key, value])
    );
  },
},

to the i18next config object.

Save functions

If you want to build your own "pages" you can still reuse the save functions:

  • deleteConsent
  • deleteCredentials
  • deleteSession
  • getApplications
  • getCredentials
  • getDevices
  • getGroups
  • getLinkedAccounts
  • getPermissionRequests
  • getPersonalInfo
  • getSupportedLocales
  • linkAccount
  • savePersonalInfo
  • unLinkAccount

Example:

import { savePersonalInfo, useEnvironment } from "@keycloak/keycloak-account-ui";

//...
function App() {
  // the save function also needs to have the context so that it knows where to POST
  // this hook gives us access to the `KeycloakProvider` context
  const context = useEnvironment();
  const submit = async (data) => {
    try {
      await savePersonalInfo(context, data);
    } catch (error) {
      // Error contains `name` and `value` of the server side errors
      // and your app will have better error handling ;)
      console.error(error);
    }
}
// ...

Building

To build a library instead of an app you need to add the LIB=true environment variable.

LIB=true pnpm run build