Skip to content

Commit

Permalink
Document plural forms with context and comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
veelo committed Aug 25, 2023
1 parent e92aa34 commit 26b293a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ auto message2 = tr!("Review the draft.", [Tr.context: "nautical",
`of the ship is below the water level.`]);
```

They work on plural forms too:
```d
writeln(tr!("One license.", "%d licenses.", [Tr.context: "software",
Tr.note: "Notice to translator."])(n));
writeln(tr!("One license.", "%d licenses.", [Tr.context: "driver's"])(n));
```

## Selecting a translation

Use the following functions to discover translation tables, get the language code for a table and activate a translation:
Expand Down

0 comments on commit 26b293a

Please sign in to comment.