# gt-node: General Translation Node.js SDK: getLocales URL: https://generaltranslation.com/en-GB/docs/node/reference/functions/get-locales.mdx --- title: getLocales description: List the supported locales configured in General Translation gt-node. API reference for getLocales. --- Returns the list of supported locales configured in [`initializeGT`](/docs/node/reference/functions/initialize-gt). ## Overview [#overview] Call `getLocales` with no arguments to get the array of supported BCP 47 locale codes. ```ts import { getLocales } from 'gt-node'; const locales = getLocales(); // ['en-US', 'es', 'fr'] ``` Signature: ```ts getLocales(): string[] ``` ## How it works [#how-it-works] * **Reads configuration.** It returns the `locales` array passed to [`initializeGT`](/docs/node/reference/functions/initialize-gt). * **Synchronous.** It returns immediately and does not need to be awaited. ## Parameters [#parameters] `getLocales` takes no parameters. ## Returns [#returns] **Type** `string[]` An array of BCP 47 locale codes representing the supported locales. ## Examples [#examples] ```ts title="handler.js" // Basic usage import { getLocales } from 'gt-node'; app.get('/api/locales', (req, res) => { res.json({ supportedLocales: getLocales() }); }); ```