Test Your Knowledge!
We'll cover the following...
Quiz on advanced compile-time code generation.
1
Take the translator
module for reference.
defmodule I18n do
use Translator
locale "wizard",
flash: [
result: "%{first} %{last} is a wizard!"
],
users: [
title: "Users",
]
locale "muggle",
flash: [
result: "%{first} %{last} is not a wizard!"
],
users: [
title: "Utilisateurs",
]
end
Which function should we run to get the following output?
"Harry Potter is not a wizard!"
A)
I18n.t("wizard", "flash.result", first: "Harry", last: "Wizard")
B)
I18n.t("wizard", "flash.result", first: "Harry", last: "Potter")
C)
I18n.t("muggle", "flash.result", first: "Harry", last: "Potter")
Question 1 of 60 attempted