*Worst title ever
EASY?
She looks so good!
Sie sieht so gut aus!
WHAT IF?
He looks so good!
Er sieht so gut aus!
Gender anyone?!
EASY?
You got 4 new messages!
Du hast 4 neue Nachrichten!
WHAT IF?
You got 1 new Message!
Du hast 1 neue Nachricht!
Singular/Plural anyone?!
EASY?
Current Date: 11/16/2012
Aktuelles Datum: 16.11.2012
WHAT IF?
Hi, it is saturday the 16th of November
Hallo, es ist Samstag der 16. November
Dates (HORROR!) anyone?!
EASY?
Wow, he got elected with 70.45% of the votes!
Wow, er wurde mit 70,45% der Stimmen gewählt!
WHAT IF?
Wow, he got elected with 70.45% (avg of 1,234.57 votes per district) of the votes!
Wow, er wurde mit 70,45% (durschnittlich 1.234,57 Stimmen pro Bezirk) der Stimmen gewählt!
NUMBERS anyone?!
EASY?
The shirt costs around 10$!
Das T-Shirt kostet zirka 10€!
CURRENCY anyone?!
Hi ${USERNAME} you have added 5 friends to 3 boards. Last change: 11/12/2012 at 5:03 pm.
Hallo ${USERNAME} du hast 5 Freunde zu 3 Themen hinzugefügt. Letzte Änderung: 12.11.2012 um 17:03.
$ npm install messageformat -g
$ messageformat -l de [myFolderWithLanguageFiles]
// date.json
{
"simple": "Current Date: {DATE}",
"adv": "Hi, it is {DAY_NAME} the {DAY} of {MONTH}"
}
<script src="en/i18n.js"></script>
window.i18n['date'].simple({DATE: '2012-06-08'});
<script src="globalize.js"></script>
<script src="culture/globalize.culture.fr.js"></script>
Globalize.culture('fr');
Globalize.format(value, format);