Scenario:
"I want to make my skin suitable for use in any language. Can I create language files to go with my skins so they are internationalised?"
Solution:
Plugin NP_Text.php allows skins to come with their very own language files so users no longer have to dig through messy html, css and Nucleus variables to completely internationalise skins / have skins display in their own language.
Original forum threads (thanks, Armon!):
http://forum.nucleuscms.org/viewtopic.php?t=14886
http://forum.nucleuscms.org/viewtopic.php?t=14904
Method:
english.php. Define each constant / word / phrase you are using in your skin in the following format:<?php define("SL_VARIABLE", "value"); ?>
english.php as:
<?php define("SL_NOCOMMENTS", "No comments"); ?>
french.php as:
<?php define("SL_NOCOMMENTS", "Pas de commentaire"); ?>
<%Text(VARIABLE)%>, e.g. <%Text(NOCOMMENTS)%>. Depending on the skin language file the visitor is using, Nucleus will display the appropriate value, e.g. visitor using English language file will see "No comments" while visitor using French language file will see "Pas de commentaire".