|
@@ -2,12 +2,12 @@
|
|
|
|
|
|
## Index
|
|
|
* [Introduction](#introduction)
|
|
|
+ * [Installation](#installation)
|
|
|
+ * [Key Mapping](#key-mapping)
|
|
|
* [Translators](#translators)
|
|
|
* [Text Frameworks](#text-frameworks)
|
|
|
* [Plugin Frameworks](#plugin-frameworks)
|
|
|
* [Configuration](#configuration)
|
|
|
- * [Key Mapping](#key-mapping)
|
|
|
- * [Installation](#installation)
|
|
|
* [Translating Mods](#translating-mods)
|
|
|
* [Manual Translations](#manual-translations)
|
|
|
* [Regarding Redistribution](#regarding-redistribution)
|
|
@@ -26,6 +26,98 @@ If you intend on redistributing this plugin as part of a translation suite for a
|
|
|
|
|
|
From version 3.0.0 it is possible to implement custom translators. See [this section](#implementing-a-translator) for more info.
|
|
|
|
|
|
+## Installation
|
|
|
+The plugin can be installed in following ways:
|
|
|
+
|
|
|
+### BepInEx Plugin
|
|
|
+REQUIRES: [BepInEx plugin manager](https://github.com/BepInEx/BepInEx) (follow its installation instructions first!).
|
|
|
+
|
|
|
+ 1. Download XUnity.AutoTranslator-BepIn-{VERSION}.zip from [releases](../../releases).
|
|
|
+ 2. Extract directly into the game directory, such that the plugin dlls are placed in BepInEx folder.
|
|
|
+
|
|
|
+The file structure should like like this:
|
|
|
+```
|
|
|
+{GameDirectory}/BepInEx/XUnity.AutoTranslator.Plugin.Core.dll
|
|
|
+{GameDirectory}/BepInEx/XUnity.AutoTranslator.Plugin.BepInEx.dll
|
|
|
+{GameDirectory}/BepInEx/XUnity.AutoTranslator.Plugin.ExtProtocol.dll
|
|
|
+{GameDirectory}/BepInEx/ExIni.dll
|
|
|
+{GameDirectory}/BepInEx/Translators/{Translator}.dll
|
|
|
+{GameDirectory}/BepInEx/Translation/AnyTranslationFile.txt (these files will be auto generated by plugin!)
|
|
|
+```
|
|
|
+
|
|
|
+### IPA Plugin
|
|
|
+REQUIRES: [IPA plugin manager](https://github.com/Eusth/IPA) (follow its installation instructions first!).
|
|
|
+
|
|
|
+ 1. Download XUnity.AutoTranslator-IPA-{VERSION}.zip from [releases](../../releases).
|
|
|
+ 2. Extract directly into the game directory, such that the plugin dlls are placed in Plugins folder.
|
|
|
+
|
|
|
+The file structure should like like this
|
|
|
+```
|
|
|
+{GameDirectory}/Plugins/XUnity.AutoTranslator.Plugin.Core.dll
|
|
|
+{GameDirectory}/Plugins/XUnity.AutoTranslator.Plugin.IPA.dll
|
|
|
+{GameDirectory}/Plugins/XUnity.AutoTranslator.Plugin.ExtProtocol.dll
|
|
|
+{GameDirectory}/Plugins/0Harmony.dll
|
|
|
+{GameDirectory}/Plugins/ExIni.dll
|
|
|
+{GameDirectory}/Plugins/Translators/{Translator}.dll
|
|
|
+{GameDirectory}/Plugins/Translation/AnyTranslationFile.txt (these files will be auto generated by plugin!)
|
|
|
+ ```
|
|
|
+
|
|
|
+### UnityInjector Plugin
|
|
|
+REQUIRES: UnityInjector (follow its installation instructions first!).
|
|
|
+
|
|
|
+ 1. Download XUnity.AutoTranslator-UnityInjector-{VERSION}.zip from [releases](../../releases).
|
|
|
+ 2. Extract directly into the game directory, such that the plugin dlls are placed in UnityInjector folder. **This may not be game root directory!**
|
|
|
+
|
|
|
+The file structure should like like this
|
|
|
+```
|
|
|
+{GameDirectory}/UnityInjector/XUnity.AutoTranslator.Plugin.Core.dll
|
|
|
+{GameDirectory}/UnityInjector/XUnity.AutoTranslator.Plugin.UnityInjector.dll
|
|
|
+{GameDirectory}/UnityInjector/XUnity.AutoTranslator.Plugin.ExtProtocol.dll
|
|
|
+{GameDirectory}/UnityInjector/0Harmony.dll
|
|
|
+{GameDirectory}/UnityInjector/Config/Translators/{Translator}.dll
|
|
|
+{GameDirectory}/UnityInjector/Config/Translation/AnyTranslationFile.txt (these files will be auto generated by plugin!)
|
|
|
+ ```
|
|
|
+
|
|
|
+### Standalone Installation (ReiPatcher)
|
|
|
+REQUIRES: Nothing, ReiPatcher is provided by this download.
|
|
|
+
|
|
|
+*NOTE: Only use this installation method if you are not using one of the above plugin managers!*
|
|
|
+
|
|
|
+ 1. Download XUnity.AutoTranslator-ReiPatcher-{VERSION}.zip from [releases](../../releases).
|
|
|
+ 2. Extract directly into the game directory, such that "SetupReiPatcherAndAutoTranslator.exe" is placed alongside other exe files.
|
|
|
+ 3. Execute "SetupReiPatcherAndAutoTranslator.exe". This will setup up ReiPatcher correctly.
|
|
|
+ 4. Execute the shortcut {GameExeName} (Patch and Run).lnk that was created besides existing executables. This will patch and launch the game.
|
|
|
+ 5. From now on you can launch the game from the {GameExeName}.exe instead.
|
|
|
+
|
|
|
+The file structure should like like this
|
|
|
+```
|
|
|
+{GameDirectory}/ReiPatcher/Patches/XUnity.AutoTranslator.Patcher.dll
|
|
|
+{GameDirectory}/ReiPatcher/ExIni.dll
|
|
|
+{GameDirectory}/ReiPatcher/Mono.Cecil.dll
|
|
|
+{GameDirectory}/ReiPatcher/Mono.Cecil.Inject.dll
|
|
|
+{GameDirectory}/ReiPatcher/Mono.Cecil.Mdb.dll
|
|
|
+{GameDirectory}/ReiPatcher/Mono.Cecil.Pdb.dll
|
|
|
+{GameDirectory}/ReiPatcher/Mono.Cecil.Rocks.dll
|
|
|
+{GameDirectory}/ReiPatcher/ReiPatcher.exe
|
|
|
+{GameDirectory}/{GameExeName}_Data/Managed/ReiPatcher.exe
|
|
|
+{GameDirectory}/{GameExeName}_Data/Managed/XUnity.AutoTranslator.Plugin.Core.dll
|
|
|
+{GameDirectory}/{GameExeName}_Data/Managed/XUnity.AutoTranslator.Plugin.ExtProtocol.dll
|
|
|
+{GameDirectory}/{GameExeName}_Data/Managed/0Harmony.dll
|
|
|
+{GameDirectory}/{GameExeName}_Data/Managed/ExIni.dll
|
|
|
+{GameDirectory}/AutoTranslator/Translators/{Translator}.dll
|
|
|
+{GameDirectory}/AutoTranslator/Translation/AnyTranslationFile.txt (these files will be auto generated by plugin!)
|
|
|
+ ```
|
|
|
+
|
|
|
+## Key Mapping
|
|
|
+The following key inputs are mapped:
|
|
|
+ * ALT + 0: Toggle XUnity AutoTranslator UI. (That's a zero, not an O)
|
|
|
+ * ALT + T: Alternate between translated and untranslated versions of all texts provided by this plugin.
|
|
|
+ * ALT + D: Dump untranslated texts (if no endpoint is configured)
|
|
|
+ * ALT + R: Reload translation files. Useful if you change the text and texture files on the fly. Not guaranteed to work for all textures.
|
|
|
+ * ALT + U: Manual hooking. The default hooks wont always pick up texts. This will attempt to make lookups manually.
|
|
|
+ * ALT + F: If OverrideFont is configured, will toggle between overridden and default font.
|
|
|
+ * ALT + Q: Reboot the plugin if it was shutdown. This will only work if the plugin was shut down due to consecutive errors towards the translation endpoint. Should only be used if you have reason to believe you have remedied the problem (such as changed VPN endpoint etc.) otherwise it will just shut down again.
|
|
|
+
|
|
|
## Translators
|
|
|
The supported translators are:
|
|
|
* [GoogleTranslate](https://anonym.to/?https://translate.google.com/), based on the online Google translation service. Does not require authentication.
|
|
@@ -52,7 +144,7 @@ The supported translators are:
|
|
|
* Example Request: GET http://my-custom-translation-service.net/translate?from=ja&to=en&text=こんにちは
|
|
|
* Example Response (only body): Hello
|
|
|
|
|
|
-**Do note that if you use any of the online translators that does not require some form of authentication, that this plugin may break at any time.**
|
|
|
+*NOTE: If you use any of the online translators that does not require some form of authentication, that this plugin may break at any time.*
|
|
|
|
|
|
Since 3.0.0, you can also implement your own translators. To do so, follow the instruction [here](#implementing-a-translator).
|
|
|
|
|
@@ -143,6 +235,7 @@ TextGetterCompatibilityMode=False ;Indicates whether or not to enable "Text Gett
|
|
|
GameLogTextPaths= ;Indicates specific paths for game objects that the game uses as "log components", where it continuously appends or prepends text to. Requires expert knowledge to setup. This is a list seperated by ';'.
|
|
|
RomajiPostProcessing=ReplaceMacronWithCircumflex;RemoveApostrophes ;Indicates what type of post processing to do on 'translated' romaji texts. This can be important in certain games because the font used does not support various diacritics properly. This is a list seperated by ';'. Possible values: ["RemoveAllDiacritics", "ReplaceMacronWithCircumflex", "RemoveApostrophes"]
|
|
|
TranslationPostProcessing=ReplaceMacronWithCircumflex ;Indicates what type of post processing to do on translated texts (not romaji). Possible values: ["RemoveAllDiacritics", "ReplaceMacronWithCircumflex", "RemoveApostrophes"]
|
|
|
+EnableExperimentalHooks=False ;Indicates whether to use experimental hooks to improve the hooking capability of the plugin (currently being tested)
|
|
|
|
|
|
[Texture]
|
|
|
TextureDirectory=Translation\Texture ;Directory to dump textures to, and root of directories to load images from. Can use placeholder: {GameExeName}
|
|
@@ -156,6 +249,7 @@ TextureHashGenerationStrategy=FromImageName ;Indicates how the mod identifies pi
|
|
|
|
|
|
[Http]
|
|
|
UserAgent= ;Override the user agent used by APIs requiring a user agent
|
|
|
+DisableCertificateValidation=False ;Indiciates whether certificate validations for the .NET API should be disabled
|
|
|
|
|
|
[GoogleLegitimate]
|
|
|
GoogleAPIKey= ;OPTIONAL, needed if GoogleTranslateLegitimate is configured
|
|
@@ -246,100 +340,11 @@ This type of post processing is also applied to normal translations, but instead
|
|
|
* `CopyToClipboard`: Copy text to translate to the clipboard to support tools such as Translation Aggregator.
|
|
|
* `Delay`: Required delay from a text appears until a translation request is queued in seconds. IMGUI not supported.
|
|
|
|
|
|
-## Key Mapping
|
|
|
-The following key inputs are mapped:
|
|
|
- * ALT + 0: Toggle XUnity AutoTranslator UI. (That's a zero, not an O)
|
|
|
- * ALT + T: Alternate between translated and untranslated versions of all texts provided by this plugin.
|
|
|
- * ALT + D: Dump untranslated texts (if no endpoint is configured)
|
|
|
- * ALT + R: Reload translation files. Useful if you change the text and texture files on the fly. Not guaranteed to work for all textures.
|
|
|
- * ALT + U: Manual hooking. The default hooks wont always pick up texts. This will attempt to make lookups manually.
|
|
|
- * ALT + F: If OverrideFont is configured, will toggle between overridden and default font.
|
|
|
- * ALT + Q: Reboot the plugin if it was shutdown. This will only work if the plugin was shut down due to consecutive errors towards the translation endpoint. Should only be used if you have reason to believe you have remedied the problem (such as changed VPN endpoint etc.) otherwise it will just shut down again.
|
|
|
-
|
|
|
-## Installation
|
|
|
-The plugin can be installed in following ways:
|
|
|
-
|
|
|
-### BepInEx Plugin
|
|
|
-REQUIRES: [BepInEx plugin manager](https://github.com/BepInEx/BepInEx) (follow its installation instructions first!).
|
|
|
-
|
|
|
- 1. Download XUnity.AutoTranslator-BepIn-{VERSION}.zip from [releases](../../releases).
|
|
|
- 2. Extract directly into the game directory, such that the plugin dlls are placed in BepInEx folder.
|
|
|
-
|
|
|
-The file structure should like like this:
|
|
|
-```
|
|
|
-{GameDirectory}/BepInEx/XUnity.AutoTranslator.Plugin.Core.dll
|
|
|
-{GameDirectory}/BepInEx/XUnity.AutoTranslator.Plugin.BepInEx.dll
|
|
|
-{GameDirectory}/BepInEx/XUnity.AutoTranslator.Plugin.ExtProtocol.dll
|
|
|
-{GameDirectory}/BepInEx/ExIni.dll
|
|
|
-{GameDirectory}/BepInEx/Translators/{Translator}.dll
|
|
|
-{GameDirectory}/BepInEx/Translation/AnyTranslationFile.txt (these files will be auto generated by plugin!)
|
|
|
-```
|
|
|
-
|
|
|
-### IPA Plugin
|
|
|
-REQUIRES: [IPA plugin manager](https://github.com/Eusth/IPA) (follow its installation instructions first!).
|
|
|
-
|
|
|
- 1. Download XUnity.AutoTranslator-IPA-{VERSION}.zip from [releases](../../releases).
|
|
|
- 2. Extract directly into the game directory, such that the plugin dlls are placed in Plugins folder.
|
|
|
-
|
|
|
-The file structure should like like this
|
|
|
-```
|
|
|
-{GameDirectory}/Plugins/XUnity.AutoTranslator.Plugin.Core.dll
|
|
|
-{GameDirectory}/Plugins/XUnity.AutoTranslator.Plugin.IPA.dll
|
|
|
-{GameDirectory}/Plugins/XUnity.AutoTranslator.Plugin.ExtProtocol.dll
|
|
|
-{GameDirectory}/Plugins/0Harmony.dll
|
|
|
-{GameDirectory}/Plugins/ExIni.dll
|
|
|
-{GameDirectory}/Plugins/Translators/{Translator}.dll
|
|
|
-{GameDirectory}/Plugins/Translation/AnyTranslationFile.txt (these files will be auto generated by plugin!)
|
|
|
- ```
|
|
|
-
|
|
|
-### UnityInjector Plugin
|
|
|
-REQUIRES: UnityInjector (follow its installation instructions first!).
|
|
|
-
|
|
|
- 1. Download XUnity.AutoTranslator-UnityInjector-{VERSION}.zip from [releases](../../releases).
|
|
|
- 2. Extract directly into the game directory, such that the plugin dlls are placed in UnityInjector folder. **This may not be game root directory!**
|
|
|
-
|
|
|
-The file structure should like like this
|
|
|
-```
|
|
|
-{GameDirectory}/UnityInjector/XUnity.AutoTranslator.Plugin.Core.dll
|
|
|
-{GameDirectory}/UnityInjector/XUnity.AutoTranslator.Plugin.UnityInjector.dll
|
|
|
-{GameDirectory}/UnityInjector/XUnity.AutoTranslator.Plugin.ExtProtocol.dll
|
|
|
-{GameDirectory}/UnityInjector/0Harmony.dll
|
|
|
-{GameDirectory}/UnityInjector/ExIni.dll
|
|
|
-{GameDirectory}/UnityInjector/Translators/{Translator}.dll
|
|
|
-{GameDirectory}/UnityInjector/Translation/AnyTranslationFile.txt (these files will be auto generated by plugin!)
|
|
|
- ```
|
|
|
-
|
|
|
-### Standalone Installation (ReiPatcher)
|
|
|
-REQUIRES: Nothing, ReiPatcher is provided by this download.
|
|
|
-
|
|
|
- 1. Download XUnity.AutoTranslator-ReiPatcher-{VERSION}.zip from [releases](../../releases).
|
|
|
- 2. Extract directly into the game directory, such that "SetupReiPatcherAndAutoTranslator.exe" is placed alongside other exe files.
|
|
|
- 3. Execute "SetupReiPatcherAndAutoTranslator.exe". This will setup up ReiPatcher correctly.
|
|
|
- 4. Execute the shortcut {GameExeName} (Patch and Run).lnk that was created besides existing executables. This will patch and launch the game.
|
|
|
- 5. From now on you can launch the game from the {GameExeName}.exe instead.
|
|
|
-
|
|
|
-The file structure should like like this
|
|
|
-```
|
|
|
-{GameDirectory}/ReiPatcher/Patches/XUnity.AutoTranslator.Patcher.dll
|
|
|
-{GameDirectory}/ReiPatcher/ExIni.dll
|
|
|
-{GameDirectory}/ReiPatcher/Mono.Cecil.dll
|
|
|
-{GameDirectory}/ReiPatcher/Mono.Cecil.Inject.dll
|
|
|
-{GameDirectory}/ReiPatcher/Mono.Cecil.Mdb.dll
|
|
|
-{GameDirectory}/ReiPatcher/Mono.Cecil.Pdb.dll
|
|
|
-{GameDirectory}/ReiPatcher/Mono.Cecil.Rocks.dll
|
|
|
-{GameDirectory}/ReiPatcher/ReiPatcher.exe
|
|
|
-{GameDirectory}/{GameExeName}_Data/Managed/ReiPatcher.exe
|
|
|
-{GameDirectory}/{GameExeName}_Data/Managed/XUnity.AutoTranslator.Plugin.Core.dll
|
|
|
-{GameDirectory}/{GameExeName}_Data/Managed/XUnity.AutoTranslator.Plugin.ExtProtocol.dll
|
|
|
-{GameDirectory}/{GameExeName}_Data/Managed/0Harmony.dll
|
|
|
-{GameDirectory}/{GameExeName}_Data/Managed/ExIni.dll
|
|
|
-{GameDirectory}/AutoTranslator/Translators/{Translator}.dll
|
|
|
-{GameDirectory}/AutoTranslator/Translation/AnyTranslationFile.txt (these files will be auto generated by plugin!)
|
|
|
- ```
|
|
|
-
|
|
|
## Translating Mods
|
|
|
Often other mods UI are implemented through IMGUI. As you can see above, this is disabled by default. By changing the "EnableIMGUI" value to "True", it will start translating IMGUI as well, which likely means that other mods UI will be translated.
|
|
|
|
|
|
+This may seem like a nice feature to have enabled by default but **never redistribute the mod with this enabled**. The reason here being that IMGUI has a very spammy nature. This does not mean that IMGUI in general will spam the endpoint, just that it is more likely to cause spam (and therefore cause the plugin to shutdown).
|
|
|
+
|
|
|
## Manual Translations
|
|
|
When you use this plugin, you can always go to the file `Translation\_AutoGeneratedTranslations.{lang}.txt` (OutputFile) to edit any auto generated translations and they will show up the next time you run the game. Or you can press (ALT+R) to reload the translation immediately.
|
|
|
|
|
@@ -349,7 +354,8 @@ In this context, the `Translation\_AutoGeneratedTranslations.{lang}.txt` (Output
|
|
|
|
|
|
## Regarding Redistribution
|
|
|
Redistributing this plugin for various games is absolutely encouraged. However, if you do so, please keep the following in mind:
|
|
|
- * **IMPORTANT: Distribute the _AutoGeneratedTranslations.{lang}.txt file along with the redistribution with as many translations as possible to ensure the online translator is hit as little as possible.**
|
|
|
+ * **Distribute the _AutoGeneratedTranslations.{lang}.txt file along with the redistribution with as many translations as possible to ensure the online translator is hit as little as possible.**
|
|
|
+ * **Do not redistribute the mod with the configuration option `EnableIMGUI=True`.**
|
|
|
* Ensure you keep the plugin up-to-date, as much as reasonably possible.
|
|
|
* If you use image loading feature, make sure you read [this section](#texture-translation).
|
|
|
|
|
@@ -376,15 +382,15 @@ TextureHashGenerationStrategy=FromImageName
|
|
|
|
|
|
`EnableTextureTranslation` enables texture translation. This basically means that textures will be loaded from the `TextureDirectory` and it's subsdirectories. These images will replace the in-game images used by the game.
|
|
|
|
|
|
-`EnableTextureDumping` enables texture dumping. This means that the mod will dump any images it has not already dumped to the `TextureDirectory`. When dumping textures, it may also be worth enabling `EnableTextureScanOnSceneLoad` to more quickly find all textures that require translating. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
|
|
|
+`EnableTextureDumping` enables texture dumping. This means that the mod will dump any images it has not already dumped to the `TextureDirectory`. When dumping textures, it may also be worth enabling `EnableTextureScanOnSceneLoad` to more quickly find all textures that require translating. **Never redistribute the mod with this enabled.**
|
|
|
|
|
|
`EnableTextureScanOnSceneLoad` allows the plugin to scan for texture objects on the sceneLoad event. This enables the plugin to find more texture at a tiny performance cost during scene load (which is often during loading screens, etc.). However, because of the way Unity works not all of these are guaranteed to be replacable. If you find an image that is dumped but cannot be translated, please report it. However, please recognize this mod is primarily intended for replacing UI textures, not textures for 3D meshes.
|
|
|
|
|
|
`EnableSpriteRendererHooking` allows the plugin to attempt to hook SpriteRenderer. This is a seperate option because SpriteRenderer can't actually be hooked properly and the implemented workaround could have a theoretical impact on performance in certain situations.
|
|
|
|
|
|
-`LoadUnmodifiedTextures` enables whether or not the plugin should load textures that has not been modified. This is only useful for debugging, and likely to cause various visual glitches, especially if `EnableTextureScanOnSceneLoad` is also enabled. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
|
|
|
+`LoadUnmodifiedTextures` enables whether or not the plugin should load textures that has not been modified. This is only useful for debugging, and likely to cause various visual glitches, especially if `EnableTextureScanOnSceneLoad` is also enabled. **Never redistribute the mod with this enabled.**
|
|
|
|
|
|
-`EnableTextureToggling` enables whether the ALT+T hotkey will also toggle textures. This is by no means guaranteed to work, especially if `EnableTextureScanOnSceneLoad` is also enabled. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
|
|
|
+`EnableTextureToggling` enables whether the ALT+T hotkey will also toggle textures. This is by no means guaranteed to work, especially if `EnableTextureScanOnSceneLoad` is also enabled. **Never redistribute the mod with this enabled.**
|
|
|
|
|
|
`TextureHashGenerationStrategy` specifies how images are identified. When images are stored, the game will need some way of associating them with the image that it has to replace.
|
|
|
This is done through a hash-value that is stored in square brackets in each image file name, like this: `file_name [0223B639A2-6E698E9272].png`. This configuration specifies how these hash-values are generated:
|
|
@@ -401,8 +407,8 @@ If you redistribute this mod with translated images, it is recommended you delet
|
|
|
You can also change the file name to whatever you desire, as long as you keep the hash appended to the end of the file name.
|
|
|
|
|
|
If you take anything away from this section, it should be these two points:
|
|
|
- * **NEVER REDISTRIBUTE THIS MOD WITH `EnableTextureDumping=True`, `EnableTextureToggling=True` OR `LoadUnmodifiedTextures=True`**
|
|
|
- * **ONLY REDISTRIBUTE THIS MOD WITH `TextureHashGenerationStrategy=FromImageData` ENABLED IF ABSOLUTELY REQUIRED BY THE GAME.**
|
|
|
+ * **Never redistribute the mod with `EnableTextureDumping=True`, `EnableTextureToggling=True` or `LoadUnmodifiedTextures=True`**
|
|
|
+ * **Only redistribute the mod with `TextureHashGenerationStrategy=FromImageData` enabled if absolutely required by the game.**
|
|
|
|
|
|
### Technical details about Hash Generation in file names
|
|
|
There are actually two hashes in the generated file name, separated by a dash (-):
|
|
@@ -412,11 +418,12 @@ There are actually two hashes in the generated file name, separated by a dash (-
|
|
|
If `TextureHashGenerationStrategy=FromImageData` is specified, only a single hash will appear in each file name, as that single hash can be used both to identify the image and to determine whether or not it has been edited.
|
|
|
|
|
|
## Integrating with Auto Translator
|
|
|
+*NOTE: Everything below this point requires programming knowledge!*
|
|
|
|
|
|
### Implementing a dedicated translation component
|
|
|
As a mod author implementing a translation plugin, you are able to, if you cannot find a translation to a string, simply delegate it to this mod, and you can do it without taking any references to this plugin.
|
|
|
|
|
|
-Here's how it works, and what is required:
|
|
|
+Here's how it works and what is required:
|
|
|
* You must implement a Component (MonoBehaviour for instance) that this plugin is able to locate by simply traversing all objects during startup.
|
|
|
* On this component you must add an event for the text hooks you want to override from XUnity AutoTranslator. This is done on a per text framework basis. The signature of these events must be: Func<object, string, string>. The arguments are, in order:
|
|
|
1. The component that represents the text in the UI. (The one that probably has a property called 'text').
|