15. Pluralize
<%= t('.email', count: @account.emails.count) %>
en:
email:
zero: You don’t have email.
one: You have one email.
few: You have some emails.
many: You have %{count} emails.
16. en:
(...)
description1: You were desconected.
description2: Try Again
description3: in a few moments
<%= t('.description1') %><strong><%= t('.description2') %></strong>
<%= t('.description3') %>
18. Link :(
<%= t('.description_html') %>
en:
(...)
description_html: Lorem ipsum dolor sit amet,
consectetur.<a href="/configuration"
target="_blank">Configuration</a>. Lorem ipsum!
19. description_html: <p>Get more information from your Lead and place
your brand using your own application in %{link}. Or creat...
configuration: Configuration
Link :D
<%= t('.description_html',
link: link_to( t('.configuration'), configuration_path,
{ target: "_blank" })) %>
24. Choosing the language
class ApplicationController < ActionController::Base
before_action :set_locale
def set_locale
I18n.locale = account.language || I18n.default_locale
end
end
36. class ApplicationController < ActionController::Base
around_action :set_time_zone, if: :current_user
def set_time_zone(&block)
Time.use_zone(current_user.timezone, &block)
end
end