How it works

General information

Localization is an addon to BG Database asset. It adds several fields, which support localization.

The fields can be string/text or unity asset (some restriction apply - asset should be placed under Resources folder or in asset bundle)

All localized data are stored in separate files, cause only one locale can be set as current, so we don't need to load data which relates to another locales.

2 ways to use localized values

  1. Single value tables - one row stores all locales values for one single field
  2. Embedded localized fields - localized fields are embedded into normal rows along with other fields.

Using single values tables

The easiest way to create locale data - is to use single values localization tables. These tables store one row per each value. No other fields are allowed. Each row has value of one single field for all locales.

Example: Gui messages, like "Menu", "Options" etc. You have one row which stores one value for "Menu" for all locales.

Using embedded fields

Embedded fields are the fields, which can be embedded to normal rows along with other fields. Embedded Locale fields can change their values, depending on which locale is set as current locale.

Example: Inventory item, name should be localized, however, along with this field, you may want to store icon, damage etc. which are just normal fields.

Embedded Locale fields does not store the value itself, but a reference to another row of special table, which has one column per locale (just like with single value tables)