Search Unity

Adjustable multi language without rebuilding

Discussion in 'Scripting' started by outlawmehdi, Sep 25, 2022.

  1. outlawmehdi

    outlawmehdi

    Joined:
    Dec 8, 2020
    Posts:
    2
    I was wondering what the possibilities are in terms of making a Multi-language system with localization
    without actually being required to rebuild the game ever again.

    In other words, is it possible to have a finished build of a game that consumes strings from an .excel or Google sheet which can be adjusted? (i.e. I adjust a certain string in the google sheet, and this can be seen in the build, without having to open Unity again and rebuild)

    If this is not possible, what other alternatives are there to make something like this possible?
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,836
    Isn't this the point of the localisation package?
     
  3. outlawmehdi

    outlawmehdi

    Joined:
    Dec 8, 2020
    Posts:
    2
    Is it?

    I understand that you can choose a certain language in-game, but I don't think it's possible to adjust the google sheet and expect it to work in the finished built. As you can see in the video you have to apply the changes in Unity by syncing the sheet again.

     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,686
    You can do this with either Asset bundles or Addressables, or else just download the text data yourself and parse it and put it where it belongs in code.

    All of the problems involved are fully documented in millions of youtube tutorials:

    - host data in a public location
    - use an access token to download from Google sheets
    - OR... how to use addressables and/ or asset bundles
    - split and parse text
    - replace text in game
     
  5. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,836
    From a glance at the docs, yes. The localisation package uses Addressables. With it, you have access to remote content functionality. It mentions supporting various forms of data origins, such as Google Sheets, too.

    Read the docs I guess: https://docs.unity3d.com/Packages/com.unity.localization@1.4/manual/index.html
     
    Bunny83 likes this.