简体   繁体   中英

Using HTML in Fat-Free-Framework .ini files

I use Fat Free Framework with a .ini file languages dictionary. Now some languages require a different layout or HTML in a translation.

If I use HTML in my .ini file, Fat Free simply (and logically) prints the HTML code instead of the parsed HTML.

What I'm looking for is something like this:

English language:
my_text_block = Go to <a href="something">Something</a> to do something.

Dutch language:
my_text_block = Instead of a href I might want a <ul>here</ul>

Should I use another translation setup than .ini files? How can I achieve this?

F3 automatically escapes every output. To prevent this, you have print the "raw" output like this:

{{@my_text_block|raw}}

Alternatively, you can set ESCAPE to false (Default: true) which disables escaping everywhere. I don't really recommend this way though.

See http://fatfreeframework.com/views-and-templates#DataSanitation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM