Use of $LOCALIZE
#1
I'm currently modding a skin and am little unsure when to and not to use $LOCALIZE.

1. I assume $LOCALIZE is not needed when referencing strings from Confluence.
2. All other strings should use $LOCALIZE - i.e. those that reference the skin's strings.xml file - should be (assuming I'd like them translated).

Is this correct please?
Reply
#2
You don't need to use $LOCALIZE if it's the only thing you want to use in a label. It makes no difference if you use strings from the core language file or from your skin's strings.xml.

So if you have a string "12345" : "Home", then you can do

PHP Code:
<label>12345</label

but need to used $LOCALIZE if you add i.e. a prefix

PHP Code:
<label>Menu$LOCALIZE[12345]</label

I'm always using $LOCALIZE[...] because I think it's more consistent and improves readability.
Image
Reply
#3
Many thanks Black - that explains it perfectly.
Reply

Logout Mark Read Team Forum Stats Members Help
Use of $LOCALIZE0