Launcher for Locale Emulator that is distributable and can be included in game packages.
By simply including LELauncher.exe
, the configuration le.config
, and the dlls LoaderDll.dll
and LocaleEmulator.dll
,
you can run any executable with the appropriate locale settings just like as you would with Locale Emulator. However,
this format makes it so you can package it with your game distributions or patches without needing to tell users to
install Locale Emulator (or manually switch locales). By simply editing le.config
with a text editor with the appropriate
values, you can include those files and have the user just run it without needing to install Locale Emulator!
NOTE: The release binaries currently only work for 32-bit applications.
Download available at https://github.com/DTM9025/LELauncher/releases.
This launcher requires those four files to be located in the same directory. In addition, it requires le.config
to
be properly configured to run the desired executable with the appropriate locale settings. You can edit le.config
with
any text editor. The fields that you can edit are in the le.config
Profile and are as follows:
Parameter
: The relative path from the directory ofLELauncher.exe
to the target executable you want to run.Location
: The locale you want to simulate. These are the same as the ones used in Locale Emulator. Common values includeja-JP
andzh-CN
. Available location codes can be found here.Timezone
: The timezone you want to simulate. These are the same as the ones in Locale Emulator. Examples areTokyo Standard Time
andChina Standard Time
.RunAsAdmin
: Whether to run the target executable as Admin or not. Can be settrue
orfalse
.RedirectRegistry
: Whether to fake language-related keys in Registry. Can be settrue
orfalse
. Recommended to be true.IsAdvancedRedirection
: Whether to fake system UI language. Can be settrue
orfalse
.RunWithSuspend
: Whether to run the target executable with a suspended process. Can be settrue
orfalse
. Recommended to be false.
Example configs for common profiles can be found in the LEConfigs
folder.
This program requires the .NET Framework 4.0 Runtime
or higher to be installed. This should be included by default in Windows 11/10/8 and
should be installed in most Windows 7 instances. If this is not the case, then you can download the runtime (or tell users to download the runtime) from here.
Due to this, this program only works for Windows 7 and up. In addition, the release binaries only work for 32bit executables.
Let's say you have a 32-bit game that you are translating. However, for some weird reason it doesn't work unless you are in
a Japanese locale, even after editing all file names, etc. (maybe text doesn't showup or it just refuses to run). You
can include this launcher in your patch and tell users to run LELauncher.exe
to run the translated patched game, allowing
you to run the game with the Japanese locale.
For starters, let's say the directory structure of the patched game zip will be this:
<Translated Game Folder To Be Zipped>
├── resources
│ ├── blah
│ └── blah
|── assets
| └── blah
| └── blah.png
└── game.exe
Before you zip this up, you add LELauncher.exe
, le.config
, LoaderDll.dll
, and LocaleEmulator.dll
into the root folder
alongside game.exe
.
To ensure it runs in the Japanese locale, you edit le.config
with a text editor and make the Location
value to be ja-JP
and
make the Timezone
value to be Tokyo Standard Time
. To ensure LELauncher.exe
launches the game you also make the Parameter
value to be game.exe
, as that is the relative path to that executable from LELauncher.exe
's directory. You set the other
parameters as appropriate.
If you want, you can also rename LELauncher.exe
to whatever is best for you (like game-en.exe
or something) to make it
more clear to users that they should run that executable to run the translated game. In addition, you could also change
the icon with external tools like Resource Hacker (instructions can be found here).
Now you can just zip the folder up with those four files as your patch distribution, and tell users to run LELauncher.exe
(or whatever you renamed it to) to run the translated patched game and it will run in the Japanese locale! All without
needing to tell the user to install Locale Emulator or switch locales in Windows!
- Clone the repo using Git.
- Install Microsoft Visual Studio 2015 / 2017. Make sure you have
.NET desktop development
checked. - Open
LELauncher.sln
. - Perform Build action.
- Clone and build the core libraries: https://github.com/xupefei/Locale-Emulator-Core
- Copy LoaderDll.dll and LocaleEmulator.dll from Locale-Emulator-Core to LELauncher build folder.
- Create a
le.config
file as appropriate and place into the build folder. (SeeLEConfigs
folder for examples).
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
This project is forked from Locale Emulator by xupefei.