S
S
Smuzzzzi2019-02-27 14:08:32
Ruby on Rails
Smuzzzzi, 2019-02-27 14:08:32

How to output a translation to a page from a file?

My ru.yml file

ru:
  hello: "Привет"

<%= t :hello %>
Need something like this
ru:
  nav:
    hello: "Привет"

and output how? does not work. Tell
<%= t :nav:hello %>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alekseiev, 2019-02-27
@Smuzzzzi

<%= t('nav.hello') %>
or is it easier
<%= t(:hello) %>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question