Post

[Okular][Windows] Permanent dark mode and Language Switch

[Okular][Windows] Permanent dark mode and Language Switch

πŸ•ΆοΈ Dark Mode

πŸˆβ€β¬› Switch to 🌚 Dark Mode RIGHT NOW!

Basically, we switch 🌚 dark mode like this:

βš™οΈ Settings > βš™οΈ Configure Okular > βœ… tick change colors > πŸŒ™ color mode: change dark & light colors > 🎨 choose 2 colors (🌈 Colors in the gif are: #cec5b4 & #2d2d2d)

switch_dark.gif

πŸ¦‰ Permanent Dark Mode

But the thing is, this setting is only temporary. If you exit the app and restart it, it’ll back to β˜€οΈ light mode again!

So here’s how to make 🌚 dark mode permanent.

  • πŸ”” Important: I downloaded Okular from the Microsoft Store and moved it to my πŸ’Ύ E:/.
  1. πŸ“ Check this path C:\Users\YourUsername\AppData\Local\okular\okularpartrc
    • If there’s a file named okularpartrc, βœ… great. If not, just create it here. (No .txt extension, just plain okularpartrc)
  2. ✍️ Edit or Create the okularpartrc file:

    1
    2
    3
    4
    5
    
     [Rendering]
     ChangeColors=true
     ColorMode=2
     DarkColor=#2D2D2D  ; 🌚 Your preferred dark background color
     LightColor=#CEC5B4  ; πŸŒ™ Your preferred text color
    

    πŸ’Ύ Save the file and restart Okular.πŸ”„ If it doesn’t work, you may need to reset the two colors manually again and click πŸ’Ύ File > Save just in case.

    Restart again. This time should be dark perfectly.

πŸ”€ Change Language (e.g. en_US)

πŸ› οΈ Why Changing Language via UI Doesn’t Work

There is a language change issue on Windows:

In βš™οΈ Setting > Configure Language - Okular, I can’t change the main language to English. When I try to change and click save, it said will change when reboot. But when I restart, it still keeps the old language setting, no matter how many times I try to change it.

So I guess here’s the thing, once you choose one language in the process of installation, Okular from the Microsoft Store seems to lock that setting. πŸ”’.

πŸ› οΈ 2 Ways to Change Language

πŸ–₯️ Forcing Language Change Through Environment Variables

  1. Press Win + R, type sysdm.cpl, and hit Enter. This opens the πŸ–₯️ System Properties window.

  2. Click on the βš™οΈ Advanced tab, then click on πŸ” Environment Variables.

  3. In the πŸ–₯️ System variables section, click on βž• New….

  4. πŸ“ Create a New Variable:
    • Variable name: LANG
    • Variable value: en_US
  5. Click βœ… OK to save, then βœ… OK again to close all windows.

  6. πŸ”„ Restart your computer (I managed to do it just by restarting Okular.).

  7. Open Okular and see if it starts in English.

πŸ’» Batch File Method (πŸ’ͺ Full Control Over Okular Launch)

Instead of trying to pass the environment variable through a shortcut directly, we’ll make a batch file to launch Okular in English mode.

  1. πŸ“‘ Open Notepad or Notepad++ (or whatever text editor you love)

  2. Paste the following code:

    1
    2
    3
    
     @echo off
     set LANG=en_US
     start "" "path\to\your\okular.exe" # your path to okular.exe
    
    • Explanation:
    • @echo off: Hides the command prompt details.
    • set LANG=en_US: Sets the language to English temporarily.
    • start: Launches Okular in a new process with the LANG environment variable applied.
  3. πŸ’Ύ Save the file as a .bat file:
    • File Name: LaunchOkularEnglish.bat
    • Location: Save it wherever you want, but maybe keep it in the same folder as your Okular executable.
  4. πŸ“‚ Double-click the LaunchOkularEnglish.bat file.

  5. Okular should now launch in English, regardless of your system’s language settings.
🌟 Making It Fancy

If you want, you can create a shortcut for this batch file and place it on your desktop or taskbar for easy access.

Why This Works:
The batch file temporarily sets the LANG environment variable just for launching Okular. No impact on your other apps, no messing with global variables. Just pure, focused execution.

πŸ’– Support me with crypto or PayPal! πŸ’˜

Bitcoin (BTC):
bc1qtzjwfyfpleyzmpqu97sdatqes98ms3zxc7u790

Ethereum (ETH) & USDT (ERC-20):
0xFE05f74DeF594f8F904D915cB93361C99cB36500

Or support me on Ko-fi:

Support me on Ko-fi

Any amount helps me continue creating content πŸ’¬πŸ’»

This post is licensed under CC BY 4.0 by the author.