# General Translation Changelog: gt-node 0.3.0: Locale utility functions
URL: https://generaltranslation.com/en-US/blog/gt-node_v0_3_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Ernest McCarter
Published: 2026-03-09

## Overview

`gt-node` now exports locale utility functions: [`getLocale()`](/docs/node/reference/functions/get-locale), [`getDefaultLocale()`](/docs/node/reference/functions/get-default-locale), [`getLocales()`](/docs/node/reference/functions/get-locales), and [`getLocaleProperties()`](/docs/node/reference/functions/get-locale-properties).

These already existed in `gt-next` and `gt-react`. Adding them to `gt-node` brings server-side parity so you can access locale information without reaching into the i18n manager directly.

## What's New

### `getLocale()`

Returns the current request locale.

```js
import { withGT, getLocale } from 'gt-node';

app.use((req, res, next) => {
  const locale = req.headers['accept-language']?.split(',')[0] || 'en-US';
  withGT(locale, () => {
    console.log(getLocale()); // 'es'
    next();
  });
});
```

### `getDefaultLocale()`

Returns the default locale set in [`initializeGT`](/docs/node/reference/functions/initialize-gt).

```js
import { getDefaultLocale } from 'gt-node';

console.log(getDefaultLocale()); // 'en-US'
```

### `getLocales()`

Returns the list of supported locales.

```js
import { getLocales } from 'gt-node';

console.log(getLocales()); // ['en-US', 'es', 'fr']
```

### `getLocaleProperties()`

Returns metadata about a locale — name, native name, region, script, etc.

```js
import { getLocaleProperties } from 'gt-node';

const props = getLocaleProperties('ja');
console.log(props.nativeName); // '日本語'
```

## Sitemap

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