Ruby on Rails - ruby on rails forum- ruby on rails tutorial - rails guides - rails tutorial - ruby rails



Ensure that we have this YAML locale file:

# config/locales/en.yml
en:
  header:
    title: "My header title"

We want to display our title string,we can do this

# in ERB files
<%= t('header.title') %>

# in SLIM files
= t('header.title')

Related Searches to use i18n in views in ruby on rails