Giezi's Input System Localisation
Translates Unity's Input System key names into multiple languages. When `InputControlPath.ToHumanReadableString` returns English key names, this package provides accurate localized alternatives through a simple API. Supports multiple languages via a CSV dictionary that can be easily extended, helping you deliver truly localized input prompts to players worldwide.
ch.giezi.tools.inputsystemlocalisation 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/inputsystemlocalisation.git README Markdown
Copy this to your project's README.md
## Installation
Add **Giezi's Input System Localisation** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/inputsystemlocalisation.git
```
[](https://www.pkglnk.dev/pkg/inputsystemlocalisation)README
Input System Localisation for Unity
Description
Localised keys for Unity's new Input System.
When calling InputControlPath.ToHumanReadableString, the returned string will always be in english (e.g. the 'Space' key), but we would like an accurate translation for any language.
This is an attempt at providing a framework to translate these keys to any language.
The source file with the input strings and translation is located in Resources/InputKeysDictionary.csv.
Usage
Assuming InputControlPath.ToHumanReadableString returns the first entry in the examples.
Example usage:
Debug.Log(Giezi.Tools.InputSystemLocalisation.GetTranslation("Space", "Fr"));
Debug.Log(Giezi.Tools.InputSystemLocalisation.GetTranslation("Space", "De"));
Debug.Log(Giezi.Tools.InputSystemLocalisation.GetTranslation("Any Key", "Fr"));
Debug.Log(Giezi.Tools.InputSystemLocalisation.GetTranslation("Any Key", "De"));
Debug.Log(Giezi.Tools.InputSystemLocalisation.GetTranslation("Numpad *", "Fr"));
Debug.Log(Giezi.Tools.InputSystemLocalisation.GetTranslation("Numpad *", "De"));
Which outputs:
Espace
Leehrtaste
N'importe quelle touche
Irgend eine Taste
Pavé Numérique *
Nummernblock *
The class returns the input string if the value is not found.
Installation
Add the line
"ch.giezi.tools.inputsystemlocalisation": "https://github.com/GieziJo/UnityInputSystemLocalisation.git#main"
to the file Packages/manifest.json under dependencies, or in the Package Manager add the link
https://github.com/GieziJo/UnityInputSystemLocalisation.git#main
under + -> "Add package from git URL....
Contribute
Feel free to modify the code or add entries to the dictionary, either additional languages or keys I've missed. Then open a pull request and they will be merged.
No comments yet. Be the first!