# General Translation Changelog: gt-next 6.13.0: msg() accepts arrays
URL: https://generaltranslation.com/en-GB/blog/gt-next_v6_13_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Ernest McCarter
Published: 2026-02-25

## Overview

[`msg()`](/docs/react/reference/functions/msg) now accepts arrays.

Previously, registering a list of related strings meant wrapping each one individually:

```tsx
const confirmations = [
  msg("Yes"),
  msg("Yup"),
  msg("Right"),
  msg("Absolutely"),
  msg("Exactly"),
];
```

This has two problems. First, every line requires a [`msg()`](/docs/react/reference/functions/msg) call. Second, related strings often need the same metadata — `$context`, `$id`, etc. — and that metadata must be inlined because the CLI resolves it at build time. For strings such as &quot;Right&quot; or &quot;Exactly&quot; that are ambiguous in isolation, you end up repeating `$context` on every entry:

```tsx
const confirmations = [
  msg("Yes"),
  msg("Yup"),
  msg("Right", { $context: "As in a confirmation" }),
  msg("Absolutely", { $context: "As in a confirmation" }),
  msg("Exactly", { $context: "As in a confirmation" }),
];
```

Now you can do this instead:

```tsx
const confirmations = msg([
  "Yes",
  "Yup",
  "Right",
  "Absolutely",
  "Exactly",
], { $context: "Confirmation responses" });
```

## Design

### ID generation

When `$id` is specified, each item in the array gets an index-based ID: `${id}.0`, `${id}.1`, etc.

```tsx
const greetings = msg([
  "Hi",
  "Hello",
  "Howdy",
], { $id: "greeting" });
// "Hi"    → id: "greeting.0"
// "Hello" → id: "greeting.1"
// "Howdy" → id: "greeting.2"
```


## Why not objects?

We were tempted to extend this to objects, but decided against it. Objects typically mix translatable and non-translatable fields:

```tsx
{
  id: 'planning.v1',           // don't translate
  message: 'Not yet enabled',  // translate
}
```

There&#39;s no clean way to express which fields should be registered without introducing more syntax. Arrays don&#39;t have this problem — every element is a string to translate.


## Future

Adding array support to `gt()` is a natural next step. Both `gt()` and [`msg()`](/docs/react/reference/functions/msg) are registration functions, so keeping them in parity makes sense. This also extends to `m()`, since [`msg()`](/docs/react/reference/functions/msg) and `m()` are often used together — having `m()` accept arrays guarantees that passing the output of [`msg()`](/docs/react/reference/functions/msg) to `m()` won&#39;t break.

## Sitemap

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