# generaltranslation: General Translation Core SDK: requiresTranslation URL: https://generaltranslation.com/en-US/docs/core/functions/locales/requires-translation.mdx --- title: requiresTranslation description: API reference for the requiresTranslation function --- ## Overview The `requiresTranslation` function determines whether translation is needed between source and target locales without requiring a GT class instance. --- ## Reference ### Parameters ### Returns `boolean` - `true` if translation is required, `false` otherwise --- ## Examples ```typescript import { requiresTranslation } from 'generaltranslation'; // Different languages require translation console.log(requiresTranslation('en-US', 'es-ES')); // true console.log(requiresTranslation('en-US', 'fr-FR')); // true // Same languages don't require translation console.log(requiresTranslation('en-US', 'en-US')); // false console.log(requiresTranslation('en-US', 'en-GB')); // false // With approved locales filter const approved = ['en-US', 'es-ES', 'fr-FR']; console.log(requiresTranslation('en-US', 'it-IT', approved)); // false (not approved) console.log(requiresTranslation('en-US', 'es-ES', approved)); // true (approved and different) ``` --- ## Notes - Respects approved locale constraints - Returns false when target not in approved list - Considers custom locale mappings ## Next steps - Use GT class method [`requiresTranslation`](/docs/core/class/methods/locales/requires-translation) - Compare languages with [`isSameLanguage`](/docs/core/functions/locales/is-same-language)