NextGlobeGen

acme.com
/en/create-translator

createTranslator

The createTranslator function returns a translator function for the given locale and namespace. This is useful in Server Actions and Route Handlers where the locale cannot be inferred from the rendering context.

Use createTranslator in server actions to get translated messages. The locale must be passed explicitly since it cannot be inferred.