# AddTable(ResourceTableCollection, Locale)

> Adds a table for a locale to a collection, or returns the collection's existing table for that locale.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Localization.Editor](/engine/6000.7/script-reference/unity/localization/editor.md)
* **Assembly:** UnityEditor

```csharp
public static ResourceTable AddTable(ResourceTableCollection collection, Locale locale)
```

### Parameters

**** (\[ResourceTableCollection]\(/engine/6000.7/script-reference/unity/localization/editor/resourcetablecollection)): The collection to add the table to.**** (\[Locale]\(/engine/6000.7/script-reference/unity/localization/locale)): The locale the table targets.

### Returns

| Type                                                                                 | Description                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ResourceTable](/engine/6000.7/script-reference/unity/localization/resourcetable.md) | The new or existing [ResourceTable](/engine/6000.7/script-reference/unity/localization/resourcetable.md), or `null` when the collection or locale is `null`, or the collection has no shared data. |

### Remarks

Creates the per-locale [ResourceTable](/engine/6000.7/script-reference/unity/localization/resourcetable.md) as a separate asset in the collection's folder, registers the collection with its content source, and saves. When the collection already has a table for the locale, that table is returned unchanged. The locale is normally one of the project's [LocalizationSettings.AvailableLocales](/engine/6000.7/script-reference/unity/localization/localizationsettings/availablelocales.md).

Additional Resources: [LocalizationEditorSettings.CreateStringEntry](/engine/6000.7/script-reference/unity/localization/editor/localizationeditorsettings/createstringentry.md), [ResourceTableCollection](/engine/6000.7/script-reference/unity/localization/editor/resourcetablecollection.md)
