Gender
- Some languages have different syntax for masculine and feminine genders.
- To adapt your sentence accordingly, just pass the param
gender: m
formale
, orgender: f
forfemale
. - To make it work, you need to provide both
male
andfemale
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>
</>
);
}