8000 Add api to retrieve localization · Issue #141 · keycloak/keycloak-client · GitHub
[go: up one dir, main page]

Skip to content

Add api to retrieve localization #141

Open

Description

@Postremus

Description

In my application I needed to retrieve the translations from keycloak.

I defined the themeapi myself, and used the restclientbuilder to invoke it. However, could this project maybe offer inbuild?

 @Produces(MediaType.APPLICATION_JSON)
    @Path("resources")
    interface ThemeAPI {

        @GET
        @Path("/{realm}/{themeType}/{locale}")
        List<KeySource> getLocalizationTexts(@PathParam("realm") String realmName, @QueryParam("theme") String theme,
                @PathParam("locale") String localeString, @PathParam("themeType") String themeType, @QueryParam("source") boolean showSource);
    }

Discussion

No response

Motivation

No response

Details

No response

Activity

  1. mposolda commented on Jan 21, 2025

    @mposolda
    Contributor

    @Postremus I belive this is already available? Can you check the admin console? The admin console uses admin REST API under the covers, so if the functionality is available in the admin console, it is available in admin REST API as well. It is maybe just calling proper endpoint might do the trick?

  2. Postremus commented on Jan 21, 2025

    @Postremus
    Author

    Yes, there is an API available, however it is not an admin rest api.

    <keycloak-url>/resources/<realm>/<themeType>/<locale>
    

    I did not find anything in the admin-client, or any of the other clients in this project, to access this resource.

    I can access the realm localizations using keycloak.realm().localizations(). However, I would prefer to work directly with the effective translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0