Skip to main content

Gender

  • Some languages have different syntax for masculine and feminine genders.
  • To adapt your sentence accordingly, just pass the param gender: m for male, or gender: f for female.
  • To make it work, you need to provide both male and female values to your JSON files.
"idiom": {
"sovereign": {
"female": "Long live the Queen!",
"male": "Long live the King!"
}
}
import React from "react";
import { useT } from "talkr";

export default function MyComponent() {
const { T } = useT();
return (
<>
<h1>{T("idiom.sovereign", { gender: "m" })}</h1>
</>
);
}