Internationalization
The I18n library is already integrated in Kogno, so the development of a multi-language chatbot is relatively easy.
Last updated
Was this helpful?
Was this helpful?
es:
hello:
- "Hola!"
- "¡Hola! 😃"
hello_name:
"Hola %{name}!"
goodbye:
"Adios 👋" class MainContext < Conversation
def actions
intent :gretting do
if @user.first_name.nil?
@reply.text t(:hello)
else
@reply.text t(:hello_name, first_name: @user.first_name)
end
end
intent :bye do
@reply.text t(:goodbye)
end
end
end
@user.set_locale(:es)