Language Translator — i18n

Translation post office: 20 levels of ICU MessageFormat: plurals (CLDR id/en/ar/ru/pl), select, number, date and BiDi. An ICU parser built from scratch.

What the levels ask

  1. The diving season opens on Pulau Karang. Bagas's mother says he takes English lessons every Tuesday and Thursday, so the pier boards are left to him. The first board greets every diver stepping off Pak Karim's boat by name: write its pattern with the placeholder {name}.
  2. Every diver wears a name card around the neck with their name and home city, on the Indonesian board: two arguments, {name} and {city}, on one line.
  3. The divers count the fish at every dive spot, and the board goes up in five languages. The same number is written differently: with dots, commas or spaces. Write {fish, number} so each board writes the number its own way.
  4. The English board beside the boat tells how many seats are left for the trip home. English has two forms: one for 1, other for the rest, zero included. Use plural, and # for the number.
  5. The same board in Indonesian. Indonesian words don't change with the count: satu kursi, lima kursi (one seat, five seats). Indonesian has only the other category.
  6. A group of divers from Oman asks how many more days the diving season runs. Arabic uses all six categories: zero, one, two, few, many, other. Its board is written right to left.
  7. Divers from Kazan ask the same thing. Russian uses one, few, many and other: 21 goes with one, 11 with many, and fractions like 1,5 (one and a half, as Russian writes it) fall in other.
  8. Divers from Gdańsk log the fish they saw. Polish is like Russian but differs at 21: only 1 is one, so 21 falls in many, while 22 falls in few. Fractions fall in other.
  9. The English boat board needs special sentences: the boat is full for 0 and "Last seat!" for exactly 1, otherwise the number of seats. Exact values are written =0 and =1; ICU matches them before the categories.
  10. A pair of diving fins was left on the pier. The English lost-and-found board uses the owner's pronoun: her, his or their. select picks a branch from the word in the argument gender.
  11. Every afternoon Bagas writes the dive log on the English board: who dived how many times. Two choosing arguments in one sentence: select for the pronoun, plural for the number of dives.
  12. Pak Karim's boat fare has not gone up since his father-in-law's day, but now it must read right on five boards. A currency is written with a number skeleton: {price, number, ::currency/IDR}.

And more, 20 levels in all.