Skip to main content

useChangeLanguage

useChangeLanguage hook is used to change the application’s language. It leverages the LanguageContext to access the language provider and provides a method to change the language.

Returns

changeLanguage
(language: Language) => void
function that triggers the language change process with the provided language code.
Language type
type Language = keyof typeof translations; // eg: "en" | "ar"