# Class LanguageResources

A localized set of string resources.

#### Hierarchy (view full)

- SerializableBase<LanguageResourcesProperties>
  - LanguageResources

#### Implements

- Entity

#####
Index

### Constructors

constructor

### Properties

_id

### Accessors

id
itemType
locale
values

### Methods

_getSerializableProperties
_toPropertyDef
assignProperties
assignPropertiesAsync
finishAssignProperties
getDefault
getDefaults
getSerializableProperties
toItemUri
toJSON

##
Constructors

### constructor

- new LanguageResources(properties?): LanguageResources

- Creates a new LanguageResources instance with the given properties.

  #### Parameters

  - `Optional` properties: LanguageResourcesProperties

    The properties to set.

  #### Returns LanguageResources

  Overrides SerializableBase.constructor

##
Properties

### `Protected`_id

_id: string

The unique ID for this entity. Once set, this should never change.

##
Accessors

### id

- get id(): string

- The unique ID for this entity.

  #### Returns string

  Implementation of Entity.id

### itemType

- get itemType(): string

- The item type for this entity when it participates in an App.

  #### Returns string

  Implementation of Entity.itemType

### locale

- get locale(): string

- The locale of the strings.

  #### Returns string

### values

- get values(): ObservableMap<string, string>

- The set of localized strings, indexed by unique key.

  #### Returns ObservableMap<string, string>

##
Methods

### `Protected`_getSerializableProperties

- _getSerializableProperties(): PropertyDefs<LanguageResourcesProperties>

- The property keys and their metadata that are used to implement serializing and deserializing the class instance.

  #### Returns PropertyDefs<LanguageResourcesProperties>

  Overrides SerializableBase._getSerializableProperties

### `Protected`_toPropertyDef

- _toPropertyDef<T>(def): PropertyDef<T>

- Converts the value to a PropertyDef object.

  #### Type Parameters

  - T

  #### Parameters

  - def: PropertyDefSerializeMode | PropertyDefSerializeMode[] | PropertyDef<T>

    The value to convert.

  #### Returns PropertyDef<T>

  Inherited from SerializableBase._toPropertyDef

### assignProperties

- assignProperties(properties): void

- Sets the properties for this item.

  #### Parameters

  - properties: Partial<LanguageResourcesProperties>

    A plain object containing property values to set, keyed by property name.

  #### Returns void

  Inherited from SerializableBase.assignProperties

### assignPropertiesAsync

- assignPropertiesAsync(properties): Promise<void>

- Sets the properties for this item.

  This version will also await any asynchronous logic that is needed to set the properties.

  #### Parameters

  - properties: Partial<LanguageResourcesProperties>

    A plain object containing property values to set, keyed by property name.

  #### Returns Promise<void>

  Inherited from SerializableBase.assignPropertiesAsync

### finishAssignProperties

- finishAssignProperties(): Promise<void>

- Waits for all deserialization logic initiated thus far to finish, whether invoked by passing properties into the constructor, or by invoking `assignProperties()` or `assignPropertiesAsync()`.

  #### Returns Promise<void>

  Inherited from SerializableBase.finishAssignProperties

### getDefault

- getDefault<K>(key): LanguageResourcesProperties[K]

- Gets the default value of an object's property.

  #### Type Parameters

  - K extends keyof LanguageResourcesProperties

  #### Parameters

  - key: K

    The property of the object for which to get the default value.

  #### Returns LanguageResourcesProperties[K]

  Inherited from SerializableBase.getDefault

### getDefaults

- getDefaults(): LanguageResourcesProperties

- Gets the object's default property values.

  #### Returns LanguageResourcesProperties

  Inherited from SerializableBase.getDefaults

### getSerializableProperties

- getSerializableProperties(serializeMode?): PropertyDefs<LanguageResourcesProperties>

- Returns the serializable properties.

  #### Parameters

  - serializeMode: SerializeMode = "all"

    Optional. If specified, only properties that support the given serialization mode will be returned.

  #### Returns PropertyDefs<LanguageResourcesProperties>

  Inherited from SerializableBase.getSerializableProperties

### toItemUri

- toItemUri(): string

- Creates an item:// URI reference to this entity.

  #### Returns string

  Implementation of Entity.toItemUri

### toJSON

- toJSON(serializeMode?): LanguageResourcesProperties

- Returns a serializable representation of the item.

  #### Parameters

  - serializeMode: SerializeMode = "all"

    If specified, only properties that are appropriate for the given mode are returned. Otherwise, all properties will be serialized.

  #### Returns LanguageResourcesProperties

  Inherited from SerializableBase.toJSON