Skip to content

Instantly share code, notes, and snippets.

@honzabilek4
Created February 3, 2021 10:03
Show Gist options
  • Save honzabilek4/755dc12594f97b1daab8d33cb47bff04 to your computer and use it in GitHub Desktop.
Save honzabilek4/755dc12594f97b1daab8d33cb47bff04 to your computer and use it in GitHub Desktop.
//…
export const getKeyPlural = (key, count) => { 
 const currentLanguage = LocalazyMeta.languages.find(l => l.language === i18next.language);
 const pluralType = currentLanguage.pluralType(+count);
 return `${key}.${pluralType}`;
}
//…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment