# Vue: GTStringOptions
URL: https://generaltranslation.com/en-GB/docs/vue/reference/types/gt-string-options.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Disambiguate a plain-string catalogue lookup with static context. API reference for GTStringOptions.

This options object is shared by [`useGT()`](/docs/vue/reference/composables/use-gt), [`t()`](/docs/vue/reference/functions/t), [`msg()`](/docs/vue/reference/functions/msg), and raw-string calls to [`useMessages()`](/docs/vue/reference/composables/use-messages).

## Overview [#overview]

```ts
type GTStringOptions = {
  $context?: string;
};
```

| Property               | Description                                                                   | Type     | Optional | Default |
| ---------------------- | ----------------------------------------------------------------------------- | -------- | -------- | ------- |
| [`$context`](#context) | Disambiguates identical source strings when calculating their catalogue hash. | `string` | Yes      | —       |

## `$context` [#context]

**Type** `string` · **Optional** · **Default** —

Use context when the same source text needs different translations in different situations:

```ts
gt('Open', { $context: 'button that opens a file' });
gt('Open', { $context: 'adjective for an available store' });
```

Context affects catalogue identity but is not displayed. Keep it static in extracted calls so that the CLI and runtime calculate the same key.

## Unsupported options [#unsupported]

Vue plain-string lookups intentionally do not accept interpolation variables, `$format`, `$locale`, `$maxChars`, or `$requiresReview`. They also do not parse ICU syntax. Braces and other message-format characters remain literal.

For runtime values, use [`<T>`](/docs/vue/reference/components/t) with [`<Var>`](/docs/vue/reference/components/var). Rich translation metadata belongs on [`<T>`](/docs/vue/reference/components/t), not in `GTStringOptions`.

## Example [#example]

```vue title="src/AccountStatus.vue"
<script setup lang="ts">
import { useGT } from 'gt-vue';

const gt = useGT();
</script>

<template>
  <span>{{ gt('Active', { $context: 'account status' }) }}</span>
</template>
```

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
