Translator Function
t function is returned by the useTranslations hook and the createTranslator function. It is used to translate the messages to the current locale in the given namespace.
See the ICU docs and the following examples for available interpolation patterns.
- Simple: message without any interpolations patterns.
- Plural: You have 3 followers.
- Complex:
NextGlobeGen invites Jon1VK and 4 other people to their party.
- Rich text : bold.
- Escaped: {interpolation} <b>Bold</b> 'quoted'
- String: abc.
- Number: 12.34.
- Integer: 12.
- Currency: $12.34.
- Percent: 1,234%.
- Date: 8/22/2026.
- Short date: 8/22/26.
- Medium date: Aug 22, 2026.
- Long date: August 22, 2026.
- Full date: Saturday, August 22, 2026.
- Time: 2:58:26 PM.
- Short time: 2:58 PM.
- Medium time: 2:58:26 PM.
- Long time: 2:58:26 PM UTC.
- Full time: 2:58:26 PM UTC.
- Ordinal: It is your 21st visit.
- This message was extracted using _defaultMessage