Skip to main content
Version: 1.X.X

Default Locale

HiTechCloud is fully localization-ready, but currently ships only with English (en) as the default language. Additional languages can be installed by the System Administrator from HiTechAdmin → Settings → Locales, and they will become immediately available in the user interface.

If your preferred locale isn’t available yet, you can help by contributing a translation: 👉 [HiTechCloud Translations on GitHub](https://github.com/hitechcloud-vietnam/HiTechCloud Panel-translations)


Setting the Default Locale

In HiTechCloud, there are five different sources that determine which locale is applied to a user. They are checked in the following priority order:

PrioritySourceExample Path / Data
1️⃣Session (session['locale'])'fr'
2️⃣User-specific file/home/<context>/locale
3️⃣Browser best matchAccept-Language: es-ES,es;q=0.9
4️⃣Default locale file/etc/hitechcloud/hitechcloud/default_locale → e.g. de
5️⃣Hardcoded final fallback'en'

1. Session Locale

When a user visits HiTechCloud, the system first checks the session for a stored locale. A session locale is created when the user logs in. For example, if the user selects 'de' (German) on the login page, that locale is set for the current session.

Note: This setting overrides all other locale sources.


2. User-Specific File

After logging in, users can change their preferred language — if the locale module and feature are enabled for them. Navigate to: HiTechCloud → Account → Change Language (Docs link) - this view lists all languages installed by the Administrator. The user’s chosen locale overrides their browser settings and the system default.

The user’s preference is stored in a per-user file:

/home/<context>/locale

3. Browser Best Match

If the user hasn’t set a locale yet, HiTechCloud checks the browser’s Accept-Language header. If the preferred language is installed on the server, it will be temporarily applied for that session.

NOTE: This only affects the current session and does not persist as a user preference. It overrides the Administrator’s default locale for that session only.

Example header:

Accept-Language: es-ES,es;q=0.9

4. Default Locale

The Administrator can set a global default locale by creating a configuration file at:

/etc/hitechcloud/hitechcloud/default_locale

For example, to set Spanish (es) as the default:

echo 'es' > /etc/hitechcloud/hitechcloud/default_locale

5. Fallback Locale

If no other locale setting is found, HiTechCloud defaults to English (en), which is included by default.


Checking Which Locale Is Active

To verify which locale is being used for a user, you can temporarily enable developer mode and check the logs.

  1. Enable dev_mode:

    hitechcloudcli config update dev_mode on
  2. Repeat the user action in the browser.

  3. Tail the logs:

    docker logs -f hitechcloud

Look for log lines similar to:

APP - Using locale..