Primary Translations
Get the list of officially supported primary translations on TMDB.
Returns the list of officially supported translations on TMDB. These are the locales that TMDB actively supports for website localization, making them the most complete and reliable for translated content.
async primary_translations(): Promise<string[]>TMDB Reference: Configuration Primary Translations
Parameters
This method takes no parameters.
Returns
A string[] array of locale codes in language-REGION format (e.g., "en-US", "it-IT").
These correspond directly to the PrimaryTranslations type.
Example
import { TMDB } from "@lorenzopant/tmdb";
const tmdb = new TMDB("your-api-key");
const translations = await tmdb.configuration.primary_translations();
console.log(translations);
// [
// "af-ZA",
// "ar-AE",
// "ar-SA",
// "en-US",
// "it-IT",
// "fr-FR",
// ...
// ]While TMDB technically allows content in any language, primary translations are the ones officially supported for the TMDB website.
Using these locale codes with the language option or parameter will yield the most complete translated data.