Translate: NEW badge

Ehren

Administrator
Staff member
Customer
Messages
5,029
Website
www.xenfocus.com
All of the xenfocus text strings can be translated using extra.less

To begin, right click on your website and select "View Page Source" (or your browser equivalent) to find out what langage code is being used. The second top line will contain a lang tag. My example below uses German.
Code:
lang="de-DE"

Keep this in mind for a moment.

To translate the NEW badge, add this to extra.less

Code:
<xf:if is="property('xenfocus_new_badge')">
       html[lang="de-DE"] .node--unread .node-title:before{
           content: 'NIEUW';
      }
</xf:if>
 
Last edited:

josuearriolaes

New Member
Messages
3
I don't know what I am doing wrong but the badge does not change. My language is Spanish "es-LA"

eee.png
 

Ehren

Administrator
Staff member
Customer
Messages
5,029
Website
www.xenfocus.com
Have you disabled the NEW badge..?

Style Properties > Xenfocus: Miscellaneous > Node and topic lists > "NEW" badge?

Make sure that's ticked. It is by default, so maybe you've accidentally disabled it at some stage.
 

Ehren

Administrator
Staff member
Customer
Messages
5,029
Website
www.xenfocus.com
Strange.. the badge is being hidden because the theme seems to think that setting is disabled..

Do you mind sending me a username/password to your ACP via PM so I can look into it?
 

Noble

New Member
Customer
Messages
15
Hi, Ehren is the code you posted to change color still valid? I tried this.

Code:
.node--unread .node-title:before{ background-color: #000000; }
<xf:if is="property('xenfocus_new_badge')">
       html[lang="en-GB"] .node--unread .node-title:before{
           content: 'We Have A New Post Here';
      }
</xf:if>
 
Top