use text object in css editor, multi language
I am trying to use text object in the Lithium css editor. But the editor does not allow me to save it.
.example:before {
content:"${text.format("multi-language.text")}";
}
It gives me error like
The following problem was found with the dtac skin CSS submitted: The following has evaluated to null or missing: ==> text [in template "blablabla" at line 1000000000, column 20] Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)?? The failing instruction: ==> ${text.format .......
In my understanding, Lithium allows you to put freemarker into the css editor.
Just like other custom components, it can throw freemarker errors in the editor, but why css editor here stops me from saving it?
I am pretty sure when css renders on the front end, the text object will not be null. Maybe I am wrong.
Here is a really real customer case:
My custom's community supports multi language, and due to the restriction of the built-in component, I cannot change its html. So I have to use css to do it.
eg. My custom want to put "Posted: " in front of the message post date and with multi language for "Posted". Little things like this can turn out to be hard.
Any suggestions?
well, it seems that I have to put this css in the wrapper section.
I can create an custom component, and throw the css into the component, and include this component into head wrapper.