Skip to content

Maksibi/GoogleSheetsLocalization

Repository files navigation

GoogleSheetsLocalization

Installation

1. Install NuGetForUnity via UPM:

https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity

2. Install Google API packages via NuGet:

  • Open NuGet > Manage NuGet Package
  • Install Google.Apis.Sheets.v4

    GoogleApi

3. Install GoogleSheetsLocalization via UPM:

https://github.com/Maksibi/GoogleSheetsLocalization.git

Setup

1. Create LocalizationHolder ScriptableObject

  • Assets > Create > LocalizationHolder

2. Fill out your information in LocalizationHolder

  • Api Key - your google sheets api key, you can find it here
  • Sheets ID - id of sheets in GoogleSheets, can be fount in URL of GoogleSheets

    SheetId
  • Sheet Name - name of sheet in GoogleSheets, can be found at bottom of GoogleSheets

    SheetName

3. Setup your table

  • Your table should look like this:

    SheetLayout
  • Fill your Keys and LocalizationValues according to layout of the table

4. Download localization

  • Open context menu of LocalizationHolder and press DownloadLocalization

Usage

  • One way of using this package is a built in LocalizationSingleton and LocalizedText. Place LocalizationSingleton in first scene of project, call Init with lang code and place LocalizedText on every text you want to localize
        LocalizationSingleton.Instance.CurrentLocalization["YourLocalizationKey"];
    
  • Another way of using is accessing LocalizationHolder's Dictionary with all localizations, this way you can swap languages or localization tables with ease.

About

No description, website, or topics provided.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages