{jrCore_lang}

  • Overview

    The {jrCore_lang} template function is the primary output function for language strings.

    If you are planning on building a skin that supports translation then you will use this function a lot.

    In the example below, the {jrCore_lang} function will try to retrieve the language string from the jrEvent module that is set for id #33.

    If it can't find that then it will default to Updated an Event instead.
    {jrCore_lang module="jrEvent" id="33" default="Updated an Event"}
  • Looking in the jrEvent modules language file found at:
    /modules/jrEvent/lang/en-US.php

    You will see items like this:
    ......
    $lang[27] = 'Update Event';
    $lang[28] = 'Adding this event will exceed your allocated allowance';
    $lang[29] = 'Adding these events will exceed your allocated allowance';
    $lang[30] = 'The event entry was not found in the datastore - please try again.';
    $lang[31] = 'Event';
    $lang[32] = 'Created a new Event';
    $lang[33] = 'Updated an Event';

    That $lang[33] corresponds to the
    {jrCore_lang module="jrEvent" id="33" default="Updated an Event"}
    used in the templates.

    But be careful! Changing that $lang[33] in the file will not update the language string after the module has been installed.
  • Once a module has been installed, all language strings are moved into the database.

    If you want to update the language string after the module has been installed, do so in the modules LANGUAGE tab.
  • screenshot of the language string in the jrEvent module that corresponds to id="33"

Tags