diff --git a/translate/src/api/other-locales.ts b/translate/src/api/other-locales.ts index b0d9ebd38e..07ffb03e40 100644 --- a/translate/src/api/other-locales.ts +++ b/translate/src/api/other-locales.ts @@ -32,9 +32,19 @@ export async function fetchOtherLocales( export async function fetchAllLocales(): Promise { const search = new URLSearchParams({ fields: 'code,name', - page_size: '200', ordering: 'name', }); - const result = await GET('/api/v2/locales/', search); - return Array.isArray(result?.results) ? result.results : []; + + const locales: LocaleOption[] = []; + let url: string | null = `/api/v2/locales/?${search}`; + + while (url) { + const result = await GET(url); + if (Array.isArray(result?.results)) { + locales.push(...result.results); + } + url = result?.next ?? null; + } + + return locales; }