Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to break lines in .yml localization files on rails?

I have a terms.en.yml file with some localization, for example:

en:   devise:     registrations:       terms:         text: 'This agreement was written in English (US). To the extent any translated version of this agreement conflicts with the English version, the English version controls.  Please note that Section 16 contains certain changes to the general terms for users outside the United States.\n\ Some new line' 

How could i break a line or create a paragraph there?

Here`s some info but it did not helped to me,i had been doing something wrong. http://yaml.org/spec/1.1/#b-paragraph-separator

like image 665
Rootical V. Avatar asked Jun 11 '12 15:06

Rootical V.


1 Answers

This works for me:

en:   hello: "Hello world"   bye: |     Bye!     See you!   error: >     Something happend.     Try later. 

Usage:

irb(main):001:0> I18n.t 'bye' => "Bye!\nSee you!\n" irb(main):002:0> I18n.t 'error' => "Something happend. Try later.\n" 
like image 163
jdoe Avatar answered Sep 20 '22 15:09

jdoe