Table of Contents Previous Next

Sugar Developer Guide

Version 5.1


Chapter 2 Application Framework : Browser JavaScript : Accessing Language Pack Strings

Accessing Language Pack Strings
All language pack strings are accessible within the browser-side JavaScript. To access these strings simply use the following JavaScript call:
// LBL_LOADING string stored in $app_strings
SUGAR.language.get('app_strings', 'LBL_LOADING');
 
// LBL_LIST_LAST_NAME string stored in Contacts $mod_strings
SUGAR.language.get('Contacts', 'LBL_LIST_LAST_NAME');
 
Admins and translators will need to be aware that these JavaScript language files are cached. If there are any changes to the language files they will need to 'rebuild' the JavaScript files from the Repair console in the admin section. This essentially removes the cache files and they will be rebuilt when needed. It also increments js_lang_version in sugar_config so that user's browser will re-cache these js files.

Table of Contents Previous Next

Copyright 2004-2008 SugarCRM Inc.
Product License