Automatically set Chrome's locale on Linux by injecting export LANGUAGE into the Chrome launcher script.
Sometimes you want to use Google Chrome in a different language than your system locale. This tool allows you to set a specific language for Chrome regardless of your system settings by modifying Chrome's launch script.
- Automatically fixes Chrome locale after updates via APT hook
- Configurable default language during installation
- Can be run manually with custom language codes
- Backs up original Chrome script before modification
fixchrome- Script that modifies Chrome's launcher to set localeinstall.sh- Installer that deploys fixchrome and sets up APT hook
Note
Installing the next update for Google Chrome resets /opt/google/chrome/google-chrome, so this file install an APT hook to reapply the locale fix automatically after each update.
Using curl to download and run the installer directly:
Default Language (vi_VN)
curl -fsSL https://github.com/ayclqt/chrome-language-apt/releases/latest/download/install.sh | sudo bashCustom Default Language
curl -fsSL https://github.com/ayclqt/chrome-language-apt/releases/latest/download/install.sh | sudo bash -s <locale_code>For example, to set English (en_US):
curl -fsSL https://github.com/ayclqt/chrome-language-apt/releases/latest/download/install.sh | sudo bash -s en_USIf you prefer to clone the repository and run locally:
git clone https://github.com/ayclqt/chrome-language-apt.git
cd chrome-language-apt
chmod +x install.sh
sudo ./install.shOr with custom language:
sudo ./install.sh <locale_code>This will:
- Copy
fixchrometo/usr/local/bin/fixchrome(downloads from GitHub if not found locally) - Set the specified language as default in fixchrome
- Make fixchrome executable
- Create APT hook at
/etc/apt/apt.conf.d/99chrome-locale - Execute fixchrome once to apply the locale immediately
After installation, fixchrome runs automatically whenever Chrome is updated via APT.
Tip
Test if it works by reinstalling Chrome:
sudo apt update && sudo apt install --reinstall google-chrome-stableAfter that, you can open Chrome to check the language
Run with default language:
sudo fixchromeRun with custom language:
sudo fixchrome <locale_code>The fixchrome script:
- Checks if
export LANGUAGE=already exists in Chrome's launcher - If not found, backs up the original script
- Inserts
export LANGUAGE="<locale>"after the first line (shebang) - Chrome will now use the specified locale
Any valid locale code, such as:
vi_VN- Vietnameseen_US- English (US)ja_JP- Japanesezh_CN- Chinese (Simplified)ko_KR- Koreanth_TH- Thai
sudo rm /usr/local/bin/fixchrome
sudo rm /etc/apt/apt.conf.d/99chrome-localeTo restore original Chrome script:
sudo cp /opt/google/chrome/google-chrome.old /opt/google/chrome/google-chrome- Google Chrome installed at
/opt/google/chrome/google-chrome - Root/sudo access
- APT package manager (Debian/Ubuntu-based systems)
MIT License
Copyright (c) 2025 ayclqt
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.