import {Meta} from '@storybook/addon-docs/blocks'

<Meta title='@dxtmisha/en/functional/Composables/useTranslateRef - Localization and translation'/>

# `useTranslateRef`

Composable for obtaining reactive translations based on keys or an array of keys. It automatically updates when the application language changes.

**Parameters:**
- `names: (string | string[])[]` — a string or an array of keys for translation.

**Returns:**
- `ShallowRef<TranslateList<T>>` — a shallow reactive reference containing the translated texts.

## Usage Example

```typescript
import { useTranslateRef, t } from '@dxtmisha/functional'

// Basic usage
const translations = useTranslateRef(['home.title', 'home.description'])

// Using shorthand 't'
const labels = t(['button.save', 'button.cancel'])

// In template: <h1>{{ translations['home.title'] }}</h1>
```
