Skip to content

Conversation

dongyu6
Copy link

@dongyu6 dongyu6 commented Jul 31, 2025

Summary

This pull request introduces the ability to configure the Kibana UI language directly via an I18N_LOCALE environment variable. This aligns with how other core settings (like ELASTICSEARCH_HOSTS) are configured in the Docker image, providing a more convenient setup for international users.

The Problem

Currently, to change the Kibana display language in a Docker environment, users must create a custom kibana. yml file, mount it into the container, and ensure all other necessary configurations are included. This process can be cumbersome, especially in automated or restricted environments where file mounting is not straightforward.

The Solution

This PR modifies the kibana-docker entrypoint script to:

  1. Check for the presence of a new environment variable: I18N_LOCALE.
  2. If the variable is set, it injects the corresponding i18n. locale key and value into the /usr/share/kibana/config/kibana. yml file before Kibana starts.

This allows users to simply add -e I18N_LOCALE="zh-CN" (or any other locale) to their docker run or docker-compose. yml file to set the language, without needing to manage custom configuration files.


How to Test This Change

  1. Clone the branch and navigate to the Kibana directory:
cd kibana
  1. Build the Docker image locally:
docker build -t kibana-i18n-test .
  1. Run a container with the new environment variable:
docker run -d --rm --name test-kibana-zh \
-e I18N_LOCALE="zh-CN" \
-e ELASTICSEARCH_HOSTS="http://some-es:9200" \
kibana-i18n-test

Adds logic to the kibana-docker startup script to check for the
I18N_LOCALE environment variable.

If the variable is set, its value is used to configure the
i18n.locale setting in kibana.yml, allowing users to set
the UI language dynamically at container startup.
Copy link

cla-checker-service bot commented Jul 31, 2025

💚 CLA has been signed

@dongyu6
Copy link
Author

dongyu6 commented Jul 31, 2025

I have signed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant