# injectSiMapTranslations Type documentation

## TypeScript declaration

### [injectSiMapTranslations](<https://github.com/siemens/element/blob/main/projects/element-ng/maplibre/si-maplibre-translate.ts#L72-L89>)

**Kind:** constant

```
import { injectSiMapTranslations } from '@siemens/element-ng/maplibre';
```

Provides translated MapLibre locale strings as an Angular signal. The record uses MapLibre's original locale keys, such as `AttributionControl.ToggleAttribution`, and updates when the active Element language changes.

Example:

```ts
@Component({ ... })
export class MapComponent {
  protected readonly mapTranslations = injectSiMapTranslations();
}
```

```html
<mgl-map [locale]="mapTranslations()" />
```

Returns: A signal containing a MapLibre locale record, for example `{ 'AttributionControl.ToggleAttribution': 'Toggle attribution' }`.

```
() => Signal<Record<string, string>> = ...
```

```
injectSiMapTranslations(): Signal<Record<string, string>>
```

Provides translated MapLibre locale strings as an Angular signal. The record uses MapLibre's original locale keys, such as `AttributionControl.ToggleAttribution`, and updates when the active Element language changes.

Example:

```ts
@Component({ ... })
export class MapComponent {
  protected readonly mapTranslations = injectSiMapTranslations();
}
```

```html
<mgl-map [locale]="mapTranslations()" />
```

Returns: A signal containing a MapLibre locale record, for example `{ 'AttributionControl.ToggleAttribution': 'Toggle attribution' }`.

**Returns:** [Signal](<https://angular.dev/api/core/Signal>)`<``Record``<`[string](<https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String>)`, `[string](<https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String>)`>>`
