Skip to content

Google Sheets Sync Pro

The Google Sheets provider enables collaborative translation workflows by loading translations directly from a Google Spreadsheet.

Access Modes

ModeRequirementBest For
Public (Published to Web)Sheet must be published to webQuick setup, no API key needed
API KeyGoogle Cloud API keyPrivate sheets, full metadata access

Important

"Shared with anyone with the link" is NOT the same as "Published to web". Public access without an API key requires the sheet to be published to the web.

Option 1: Public Access (No API Key)

For quick setup without API credentials, publish your sheet to the web:

Publishing a Google Sheet

  1. Open your Google Sheet in the browser
  2. Go to File → Share → Publish to web
  3. In the dialog:
    • Select Entire Document or specific sheets
    • Choose Web page or CSV format (either works)
  4. Click Publish
  5. Confirm when prompted

Limitations

  • Sheet must remain published (anyone with URL can view)
  • Cannot enumerate all sheet names automatically
  • No push/write support - public access is read-only

Setup

  1. In LocalizationSettings, set Provider to Google Sheets
  2. Enter your Spreadsheet ID (from the URL)
  3. Check Is Public
  4. Click Fetch to load available sheets
  5. Select your sheet from the dropdown

Option 2: API Key Access

For private sheets or full functionality, use a Google Cloud API key.

Getting an API Key

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable the Google Sheets API:
    • Go to APIs & Services → Library
    • Search for "Google Sheets API"
    • Click Enable
  4. Create an API key:
    • Go to APIs & Services → Credentials
    • Click Create Credentials → API Key
    • (Recommended) Restrict the key to Google Sheets API only
  5. Copy the API key

Benefits

  • Works with private sheets (shared with specific users)
  • Full sheet name enumeration in the Fetch dropdown
  • Push/write support for syncing translations back

Security

Never commit API keys to version control. The API key field stores keys in EditorPrefs (not in the asset). For CI/CD, set the LEXIS_GOOGLE_API_KEY environment variable.

Expected Sheet Format

KeyendefrComment
ui.welcomeWelcome!Willkommen!Bienvenue!Main menu greeting
ui.startStart GameSpiel startenDémarrer
ui.quitQuitBeendenQuitter
  • First column: Translation keys
  • Header row: Locale codes (en, de, fr, etc.)
  • Optional: Comment column for translator notes

Multi-Sheet Configuration

Lexis supports syncing multiple Google Sheets tabs, where each tab maps to a StringTable by its TableId.

How Mapping Works

  • Google Sheet tab "UI" → StringTable with TableId "UI"
  • Google Sheet tab "Dialogues" → StringTable with TableId "Dialogues"
  • If no matching StringTable exists, one is created automatically

Configuration

API Key Mode (Recommended):

  1. Enter your Spreadsheet ID and API Key
  2. Click Fetch to load available sheets
  3. Check the boxes next to sheets you want to sync

Public Mode:

  1. Enter your Spreadsheet ID
  2. Use the + Add Sheet button to add sheet names
  3. Enter each sheet name manually (must match exactly)

Sync Operations

OperationDescription
Pull Selected TableSync from sheet matching current table's TableId
Pull All SheetsSync from all configured sheets at once
Push Selected TablePush current table to the provider (requires API key)
Push All TablesPush all tables to the provider

Pull Behavior

Pull performs a true sync:

  • Adds new entries
  • Updates modified entries
  • Deletes entries that no longer exist in the source

A consent dialog shows changes before applying:

  • Green: New entries to add
  • Yellow: Entries to modify (with before/after preview)
  • Red: Entries to delete

Push Requirements

Push operations to Google Sheets require an API key with write permissions. Pushing to public (published-to-web) sheets is not supported.

Sync Menu

Access sync operations from the String Table Browser toolbar (gear icon dropdown):

  • Pull Selected Table
  • Pull All Sheets
  • Push Selected Table
  • Push All Tables
  • Configure Provider...

Troubleshooting

ErrorCauseSolution
"Access denied"Sheet not published or wrong sharingPublish to web (File → Share → Publish to web)
"Invalid API key"API key is incorrect or expiredVerify key in Google Cloud Console
"Could not detect sheet names"Sheet name doesn't match defaultsEnter sheet name manually, or use API key
Empty data returnedSheet has no contentAdd data to your spreadsheet
"Push not supported"Trying to push to public sheetPush requires an API key
Entries unexpectedly deletedPull performs true syncThis is expected; entries not in source are removed

Professional Unity Development Tools