i18n-possessive
Convert a noun into its possessive form in any of the supported languages, such as John
to John's
(English) or Bella
to de Bella
(French).
Given a noun {name}
language support and rules are as follows:
- English:
{name}’s
always (the old rule about not adding’s
if the name ends ins
is outdated). - Spanish:
de {name}
always. - French:
de {name}
ord’{name}
, the latter for names beginning with a vowel. - German:
{name}s
or{name}’
, the latter for names ending in[sßxz]
. - Japanese:
{name}の
always.
Examples
; possessive"John", "en"); // John’spossessive"Sebastián", "es"; // de Sebastiánpossessive"Bella", "fr"; // de Bellapossessive"Adalene", "fr"; // d’Adalenepossessive"Leon", "de"; // Leonspossessive"Niklas", "de"; // Niklas’possessive"はると", "ja"; // はるとの
Thanks to Scott from the Slack team for the guidance!