How to setup/install in Rails 4 the i18n-js for translations in javascript -


for javascripts translations in rails 4 used following library. did:

gemfile:

gem "i18n-js", ">= 3.0.0.rc11" 

in assets/javascripts/application.rb:

//= require i18n/translations 

and worked on config/locales/en.yml data

example:

en:   save:      text1: value1   independency:     text2: value2   

in view used translations, in rails.

series: [{           name: '',               data: [                ["<%=t 'independency.text1' %>", independency],                ["<%=t 'save.text2' %>", 100-independency],                            ]                 }]  

the thing have run command rake i18n:js:export after doing change in translation file involved javascript part.

moreover, next day after starting pc , opening again application (localhost:3000) javascript translations did not work @ all. had run again command rake i18n:js:export.

is there option avoid executing command every time? me difficult understand documentation.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

html - Outlook 2010 Anchor (url/address/link) -