Pathway

Pathway

View Stats:
 This topic has been pinned, so it's probably important
Jack_Skater  [developer] 13 Jan, 2022 @ 7:48am
Steam Workshop Support - Translations
Adding a new language

Let's say you want to add Canadian-English as a language to the game.

Navigate to the Pathway installation folder - the Steam version can be found at {Your Steam Installation}\steamapps\common\Pathway. It contains a i18n subfolder, which in turn contains a few subfolders, one for each language the game supports.

You will also find a handful of tools in the i18n folder that will help you with the process of translating the game:

  • PathwayLanguageTools.jar
  • SetupNewLanguage.bat
  • ImportLanguage.bat

These tools will allow you to use Excel for translating, instead of having to edit json files directly. However, the tools currently only work on Windows. To be clear, the final translation *will* work on any platform, but the tools do not. (It is possible to create a translation without using the tools, you just can't use the Excel sheets to do so)

Copy the above 3 files to the root folder (installation folder) of Pathway.

The next step is to now setup a new language. Open up the SetupNewLanguage.bat in a text editor and change the `setLangCode=` line to the language code of your choice.

We use common _country-language codes_ for the default languages and in this example, but you can use any identifier you want - as long as they're unique and used consistently in all places we need them. So for Canadian-English we'd pick en-CA. The final line would look like this: setLangCode=en-CA. Save and close the file. Now repeat this process with the ImportLanguage.bat file. If you then run (double-click) the SetupNewLanguage.bat, it'll create a new language folder for you inside the i18n folder.

Inside this newly created en-CA folder you'll find a bunch of JSON and Excel files. One of them is called _config.json. Open it in a text editor. It'll look something like this:

{ "code": "en-CA", "systemCode": "en", "asianLanguage": false, "label": "en-CA" }

The `label` property will be used for the language selection box in the game's options menu. We probably want to change it to something more human readable like "Canadian English".

You should now be able to launch the game, and change its language to Canadian English in the options menu.

Note: This initial setup only needs to happen *once* on one system. If you want to share the translation work with other people, you can simply give them a copy of your language folder (including the xls sheets).

Translation work

Right next to the `_config.json` file you'll find the game's actual text content which needs to be translated. You'll notice that they are split up into matching Excel (.xls) and JSON files. The game uses the JSON files. But for ease of translation you can use the Excel sheets provided.

Once you've translated a few things and are ready to test them out you need to run the ImportLanguage.bat in the root folder of Pathway and it'll automatically synchronize the JSON files.

Preparing for the Steam Workshop

You'll need to prepare two more files in order to upload your work to the Steam Workshop and share it with other people.

First, add a file called `en-CA_steam.json` to the `i18` folder. Again, you should use the same language identifier as above, and append with `*_steam.json`.

This JSON needs to be configured like this:

{ "title": "Canadian English", "description": "This is just an example.", "preview": "en-CA_preview.png" }

The second file you'll need is an image used by the Steam Workshop to preview your work. Steam claims to support PNG, JPEG and GIF formats - just make sure to update the file name/extension in your `*_steam.json` file accordingly.

Now, your folder and files should look like this:

Pathway/ + i18n/ + en-CA/ _config.json Achievements.json Codex.json Events.json GameUI.json Items.json Perks.json Quotes.json Tutorial.json ... en-CA_preview.png en-CA_steam.json

Note that the whole content of the en-CA/ folder will be uploaded to Steam, so you should make sure to not include any other files in there! If you still have your Excel (.xls) files in the folder, copy them somewhere else during the steam upload process and return them after uploading.

Upload to the Steam Workshop

Make sure you run the import script and verify the translation works locally before attempting to upload it. You are responsible for making sure everything works. :)

In order to upload your translation to the Steam Workshop, navigate to the game's root folder and run this command:

# Linux or MacOS ./Pathway --steam --steam-upload-language=en-CA # Windows Pathway.exe --cli --console -- --steam --steam-upload-language=en-CA

Yes, we agree that the Windows version is looking weird. The additional parameters are needed to get some actual console output to look at.

You may run into some Steam errors while trying this upload. In this case, you'll very likely just need to drop a small text file named `steam_appid.txt` into your Pathway folder. This file only needs to contain one number, the App ID of the game:

546430

During the initial upload your *_steam.json file will be rewritten, with a publishedFileID property added. This is the ID the Steam Workshop has assigned to your translation. You should write this ID down - or make a copy of the JSON file - if you intent to update your work later.

After an upload has been completed, your Steam client should redirect you to the corresponding Workshop page, where you can accept the Steam Workshop License Agreement, review & edit additional information about your Workshop item, and change its visibility to make it available to other Steam users.

Testing

To test your Workshop item, just subscribe to it yourself, then restart the game.

Please note that a local copy in your Pathway installation folder will always take precendence - so in order to "simulate" a real user experience, move your local files to a different location first.
< >
Showing 1-15 of 15 comments
nacho 15 Jan, 2022 @ 5:33pm 
que buen juego
konstantynov 20 Jan, 2022 @ 9:23pm 
Super
konstantynov 20 Jan, 2022 @ 9:25pm 
super:steamthumbsup:
Lobo 21 Jan, 2022 @ 7:11am 
C:\Program Files (x86)\Steam\steamapps\common\Pathway>SetupNewLanguage.bat SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/PathwayLanguageTools.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/pathway-game.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] Exception in thread "main" java.lang.NoSuchMethodError: com.robotality.game.i18n.LanguageTable.read(Lcom/badlogic/gdx/files/FileHandle;[Ljava/lang/String;[Ljava/lang/String;)Lcom/robotality/game/i18n/LanguageTable; at com.robotality.tools.ExcelExporter.<init>(ExcelExporter.java:103) at com.robotality.tools.ExcelImportExport.main(ExcelImportExport.java:33)

This error happens when I try to use SetupNewLanguage.bat
bach  [developer] 24 Jan, 2022 @ 7:32am 
Originally posted by Lobo:
C:\Program Files (x86)\Steam\steamapps\common\Pathway>SetupNewLanguage.bat SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/PathwayLanguageTools.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/pathway-game.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] Exception in thread "main" java.lang.NoSuchMethodError: com.robotality.game.i18n.LanguageTable.read(Lcom/badlogic/gdx/files/FileHandle;[Ljava/lang/String;[Ljava/lang/String;)Lcom/robotality/game/i18n/LanguageTable; at com.robotality.tools.ExcelExporter.<init>(ExcelExporter.java:103) at com.robotality.tools.ExcelImportExport.main(ExcelImportExport.java:33)

This error happens when I try to use SetupNewLanguage.bat

It looks like you got it working in the end?

Bach
normaljniy huy
Lobo 24 Jan, 2022 @ 11:44am 
Originally posted by bach:
Originally posted by Lobo:
C:\Program Files (x86)\Steam\steamapps\common\Pathway>SetupNewLanguage.bat SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/PathwayLanguageTools.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/pathway-game.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] Exception in thread "main" java.lang.NoSuchMethodError: com.robotality.game.i18n.LanguageTable.read(Lcom/badlogic/gdx/files/FileHandle;[Ljava/lang/String;[Ljava/lang/String;)Lcom/robotality/game/i18n/LanguageTable; at com.robotality.tools.ExcelExporter.<init>(ExcelExporter.java:103) at com.robotality.tools.ExcelImportExport.main(ExcelImportExport.java:33)

This error happens when I try to use SetupNewLanguage.bat

It looks like you got it working in the end?

Bach

Hi Bach

No, I ended up creating my own Excel where I could transtale it more easily.


Maybe I´m using the wrong Java version. I don't know :)
NEDZHI 3 Feb, 2022 @ 8:15pm 
пп
Dopamina 1 Mar, 2022 @ 1:07pm 
Originally posted by Lobo:
C:\Program Files (x86)\Steam\steamapps\common\Pathway>SetupNewLanguage.bat SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/PathwayLanguageTools.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/pathway-game.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] Exception in thread "main" java.lang.NoSuchMethodError: com.robotality.game.i18n.LanguageTable.read(Lcom/badlogic/gdx/files/FileHandle;[Ljava/lang/String;[Ljava/lang/String;)Lcom/robotality/game/i18n/LanguageTable; at com.robotality.tools.ExcelExporter.<init>(ExcelExporter.java:103) at com.robotality.tools.ExcelImportExport.main(ExcelImportExport.java:33)

This error happens when I try to use SetupNewLanguage.bat

In my case I can't even export the Excel file... Can anyone help me?
Szasza (Heliximus) 18 Aug, 2022 @ 11:49pm 
Hi Developer,

The Hungarian language contains some special characters that do not appear in the game, e.g. őű
How can this be fixed?
Zangetsu 16 Dec, 2022 @ 8:51am 
Spanish translation in Workshop is awesome. Perfect :praisesun:
LemonadeCat 20 Feb, 2023 @ 2:14am 
Originally posted by 𝕯𝖔𝖕𝖆𝖒𝖎𝖓𝖊:
Originally posted by Lobo:
C:\Program Files (x86)\Steam\steamapps\common\Pathway>SetupNewLanguage.bat SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/PathwayLanguageTools.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/pathway-game.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] Exception in thread "main" java.lang.NoSuchMethodError: com.robotality.game.i18n.LanguageTable.read(Lcom/badlogic/gdx/files/FileHandle;[Ljava/lang/String;[Ljava/lang/String;)Lcom/robotality/game/i18n/LanguageTable; at com.robotality.tools.ExcelExporter.<init>(ExcelExporter.java:103) at com.robotality.tools.ExcelImportExport.main(ExcelImportExport.java:33)

This error happens when I try to use SetupNewLanguage.bat

In my case I can't even export the Excel file... Can anyone help me?

Conseguiu fazer? tentei mais deu erro aqui tbm...
Czerstwy 28 Apr, 2024 @ 2:43am 
Originally posted by bach:
Originally posted by Lobo:
C:\Program Files (x86)\Steam\steamapps\common\Pathway>SetupNewLanguage.bat SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/PathwayLanguageTools.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/Steam/steamapps/common/Pathway/pathway-game.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] Exception in thread "main" java.lang.NoSuchMethodError: com.robotality.game.i18n.LanguageTable.read(Lcom/badlogic/gdx/files/FileHandle;[Ljava/lang/String;[Ljava/lang/String;)Lcom/robotality/game/i18n/LanguageTable; at com.robotality.tools.ExcelExporter.<init>(ExcelExporter.java:103) at com.robotality.tools.ExcelImportExport.main(ExcelImportExport.java:33)

This error happens when I try to use SetupNewLanguage.bat

It looks like you got it working in the end?

Bach
I have simillar problem, are there any fix? I reinstalled JAVA, it didn't help
< >
Showing 1-15 of 15 comments
Per page: 1530 50