Custom localizations guide!


To generate localization resources, run the game executable with -nani-eject argument, eg: ./game.exe -nani-eject

— this will launch the game as usual, but after Naninovel is initialized, it will eject the localization resources to Unity's persistent data folder 🡕 under Localization folder. For example, if the application's company is Foo and game title is Bar ejected path on Windows will be following: C:/Users/User/AppData/LocalLow/Foo/Bar/Localization.

If you'd like to generate localization resources based on a built-in localization, append the locale tag to the eject arg. Eg, given the game has ja-JP localization, use the following args to eject the Japanese localization documents: -nani-eject-ja-JP. When the locale tag is not specified, documents for the source locale(english) are ejected.

Notice Localization/Author.txt file; you can specify author of the localization by replacing the default content of the file. The content is displayed in the language dropdown by default, but developer may customize this behaviour. Don't delete the file itself, as it's required to detect presence of the community localization.

Restart the game as usual (without the eject arg) and it will automatically use the localization resources at the persistent data folder. For changes in script localization to take effect, associated script have to be re-loaded (save-loading is usually enough), but it may be required to restart the game in some cases.

In case developer updates the game, you can eject again to update the existing localization; new lines and records will be inserted, while existing translation for the unchanged source material will not be lost.

After the localization is finished, share the Localization folder and instruct end-users to place it under the aforementioned persistent data directory to activate the localization. To disable the localization, delete the folder.

Application.persistentDataPath(https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html):

Windows: Application.persistentDataPath usually points to %userprofile%\AppData\LocalLow\<companyname>\<productname>.

Linux: Application.persistentDataPath points to $XDG_CONFIG_HOME/unity3d or $HOME/.config/unity3d.

iOS: Application.persistentDataPath points to /var/mobile/Containers/Data/Application/<guid>/Documents.

tvOS: Application.persistentDataPath is not supported and returns an empty string.

Android: Application.persistentDataPath points to /storage/emulated/<userid>/Android/data/<packagename>/files on most devices (some older phones might point to location on SD card if present).

Mac: Application.persistentDataPath points to the user Library folder. (This folder is often hidden.) In recent Unity releases user data is written into ~/Library/Application Support/company name/product name. Older versions of Unity wrote into the ~/Library/Caches folder, or ~/Library/Application Support/unity.company name.product name. These folders are all searched for by Unity. The application finds and uses the oldest folder with the required data on your system.

WebGL: Application.persistentDataPath points to /idbfs/<md5 hash of data path> where the data path is the URL stripped of everything including and after the last '/' before any '?' components.

You can post links on your localization in the comments. 

WARNING! Click links at your own risk!

Get Chubby Story [v1.4.2] (Localization)

Leave a comment

Log in with itch.io to leave a comment.