Created
May 29, 2019 12:38
-
-
Save theodesp/bc1e7e466ab14068f636d3a6f41587ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var formatter; | |
// Note you can define multiple lines message using an Array of Strings. | |
Globalize.loadMessages({ | |
en: { | |
party: [ | |
"{hostGender, select,", | |
" female {{from} joined {to}} at her excursion}", | |
" male {{from} joined {to} at his excursion}", | |
" other {{from} joined {to} to their excursion}", | |
"}" | |
] | |
} | |
}); | |
formatter = Globalize( "en" ).messageFormatter( "propose" ); | |
formatter({ | |
from: "Maria", | |
to: "Alex", | |
hostGender: "female" | |
}); | |
// > "Maria invited Alex at her excursion" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment