Line Break in String in config/locale internationalization file to show proper language format in view rails

StackOverflow https://stackoverflow.com/questions/22106147

문제

My client wants a string to show up as two sentences in the front. I am having trouble figuring out how I can do this.

for example in my config/locales/he-IL.yml file I have this

  home:
    instructions: "I am the world, please like ruby"

in my view I want it to show up as

I am the world please 
            like ruby 

its actually in hebrew, it should look like this

הכנס את קוד זיהוי המחקר שלך וקוד המשתתף שלך לשדות הבאים. נא ליצור קשר
                                           עמנו אם יש לך שאלות נוספות.

please note that its read from right to left. Right now I have it lump as one piece of string so its not entirely viewed correctly in the front.

I have tried double quoting, using a new line, google for regular expressions and checking out the rails internationalization docs. would anyone have an answer for this?

도움이 되었습니까?

해결책

You can use html tags inside. Just add _html.

home:
    instructions_html: |
                  I am the world, <br/>
                  please like ruby
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top