id
stringlengths 14
16
| text
stringlengths 33
5.27k
| source
stringlengths 105
270
|
---|---|---|
3e2f7a21b4a9-9 | 'buttonConfig3' => "tablecontrols,separator,advhr,hr,removeformat,separator,insertdate,inserttime,separator,preview"
);
//Standard email compose
$buttonConfigs['email_compose'] = array(
'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,",
'buttonConfig2' => "", //empty
'buttonConfig3' => "" //empty
);
//Quick email compose
$buttonConfigs['email_compose_light'] = array( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/index.html |
3e2f7a21b4a9-10 | $buttonConfigs['email_compose_light'] = array(
'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,",
'buttonConfig2' => "", //empty
'buttonConfig3' => "" //empty
);
Overriding Default Settings
The second override file is for basic TinyMCE functionality. To do this, you must create ./custom/include/tinyMCEDefaultConfig.php. TinyMCE has quite a few settings that can be altered, so the best reference for configuration settings can be found in the TinyMCE Configuration Documentation. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/index.html |
3e2f7a21b4a9-11 | Example File
./custom/include/tinyMCEDefaultConfig.php
<?php
$defaultConfig = array(
'convert_urls' => false,
'valid_children' => '+body[style]',
'height' => 300,
'width' => '100%',
'theme' => 'advanced',
'theme_advanced_toolbar_align' => "left",
'theme_advanced_toolbar_location' => "top",
'theme_advanced_buttons1' => "",
'theme_advanced_buttons2' => "",
'theme_advanced_buttons3' => "",
'strict_loading_mode' => true,
'mode' => 'exact',
'language' => 'en', | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/index.html |
3e2f7a21b4a9-12 | 'mode' => 'exact',
'language' => 'en',
'plugins' => 'advhr,insertdatetime,table,preview,paste,searchreplace,directionality',
'elements' => '',
'extended_valid_elements' => 'style[dir|lang|media|title|type],hr[class|width|size|noshade],@[class|style]',
'content_css' => 'include/javascript/tiny_mce/themes/advanced/skins/default/content.css',
);
Creating Plugins
Another alternative to customizing the TinyMCE is to create a plugin. Your plugins will be stored in ./include/javascript/tiny_mce/plugins/. You can find more information on creating plugins on the TinyMCE website. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/index.html |
3e2f7a21b4a9-13 | the use and customization of TinyMCE.
TopicsModifying the TinyMCE EditorThis article is a brief overview on how to modify the default settings for the TinyMCE editor by creating an override file. There are two different overrides that can be applied to buttons and default settings.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/index.html |
0a6b375a7f99-0 | Modifying the TinyMCE Editor
Overview
This article is a brief overview on how to modify the default settings for the TinyMCE editor by creating an override file. There are two different overrides that can be applied to buttons and default settings.
Overriding Buttons
The first override file is for the toolbar buttons. To do this, you must create ./custom/include/tinyButtonConfig.php. Within this file, you will be able to override the button layout for the TinyMCE editor.
There are 3 different layouts you can change:
default : Used when creating an email template
email_compose : Used when composing an email from the full form under the Emails module
email_compose_light : Used when doing a quick compose from a listview or subpanel
Example File
./custom/include/tinyButtonConfig.php
<?php
//create email template | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/Modifying_the_TinyMCE_Editor/index.html |
0a6b375a7f99-1 | ./custom/include/tinyButtonConfig.php
<?php
//create email template
$buttonConfigs['default'] = array(
'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,", | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/Modifying_the_TinyMCE_Editor/index.html |
0a6b375a7f99-2 | 'buttonConfig2' => "cut,copy,paste,pastetext,pasteword,selectall,separator,search,replace,separator,bullist,numlist,separator,outdent,indent,separator,ltr,rtl,separator,undo,redo,separator, link,unlink,anchor,image,separator,sub,sup,separator,charmap,visualaid",
'buttonConfig3' => "tablecontrols,separator,advhr,hr,removeformat,separator,insertdate,inserttime,separator,preview"
);
//Standard email compose
$buttonConfigs['email_compose'] = array( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/Modifying_the_TinyMCE_Editor/index.html |
0a6b375a7f99-3 | $buttonConfigs['email_compose'] = array(
'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,",
'buttonConfig2' => "", //empty
'buttonConfig3' => "" //empty
);
//Quick email compose
$buttonConfigs['email_compose_light'] = array( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/Modifying_the_TinyMCE_Editor/index.html |
0a6b375a7f99-4 | $buttonConfigs['email_compose_light'] = array(
'buttonConfig' => "code,help,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,styleselect,formatselect,fontselect,fontsizeselect,",
'buttonConfig2' => "", //empty
'buttonConfig3' => "" //empty
);
Overriding Default Settings
The second override file is for basic TinyMCE functionality. To do this, you must create ./custom/include/tinyMCEDefaultConfig.php. TinyMCE has quite a few settings that can be altered, so the best reference for configuration settings can be found in the TinyMCE Configuration Documentation. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/Modifying_the_TinyMCE_Editor/index.html |
0a6b375a7f99-5 | Example File
./custom/include/tinyMCEDefaultConfig.php
<?php
$defaultConfig = array(
'convert_urls' => false,
'valid_children' => '+body[style]',
'height' => 300,
'width' => '100%',
'theme' => 'advanced',
'theme_advanced_toolbar_align' => "left",
'theme_advanced_toolbar_location' => "top",
'theme_advanced_buttons1' => "",
'theme_advanced_buttons2' => "",
'theme_advanced_buttons3' => "",
'strict_loading_mode' => true,
'mode' => 'exact',
'language' => 'en', | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/Modifying_the_TinyMCE_Editor/index.html |
0a6b375a7f99-6 | 'mode' => 'exact',
'language' => 'en',
'plugins' => 'advhr,insertdatetime,table,preview,paste,searchreplace,directionality',
'elements' => '',
'extended_valid_elements' => 'style[dir|lang|media|title|type],hr[class|width|size|noshade],@[class|style]',
'content_css' => 'include/javascript/tiny_mce/themes/advanced/skins/default/content.css',
);
Creating Plugins
Another alternative to customizing the TinyMCE is to create a plugin. Your plugins will be stored in ./include/javascript/tiny_mce/plugins/. You can find more information on creating plugins on the TinyMCE website. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/Modifying_the_TinyMCE_Editor/index.html |
0a6b375a7f99-7 | Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/TinyMCE/Modifying_the_TinyMCE_Editor/index.html |
78e9ccfa6bf9-0 | Entry Points
Overview
Entry points, defined in ./include/MVC/Controller/entry_point_registry.php, were used to ensure that proper security and authentication steps are applied consistently across the entire application. While they are still used in some areas of Sugar, any developers using custom entry points should adjust their customizations to use the latest REST API endpoints instead.
Accessing Entry Points
Available custom entry points can be accessed using a URL pattern as follows:
http://{sugar url}/index.php?entryPoint={entry point name}
The entry point name will be the specified index in the $entry_point_registry array. Access to this entry point outside of sugar will be dependent on the auth parameter defined in the $entry_point_registry array as well. For more information, refer to the Creating Custom Entry Points page. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Entry_Points/index.html |
78e9ccfa6bf9-1 | TopicsCreating Custom Entry PointsAs of 6.3.x, entry points can be created using the extension framework. The entry point extension directory, located at ./custom/Extension/application/Ext/EntryPointRegistry/, is compiled into ./custom/application/Ext/EntryPointRegistry/entry_point_registry.ext.php after a Quick Repair and Rebuild. Additional information can be found in the extensions EntryPointRegistry section.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Entry_Points/index.html |
de54e8e91796-0 | Creating Custom Entry Points
Overview
As of 6.3.x, entry points can be created using the extension framework. The entry point extension directory, located at ./custom/Extension/application/Ext/EntryPointRegistry/, is compiled into ./custom/application/Ext/EntryPointRegistry/entry_point_registry.ext.php after a Quick Repair and Rebuild. Additional information can be found in the extensions EntryPointRegistry section.
Custom Entry Points | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Entry_Points/Creating_Custom_Entry_Points/index.html |
de54e8e91796-1 | Custom Entry Points
Prior to 6.3.x, an entry point could be added by creating the file ./custom/include/MVC/Controller/entry_point_registry.php. This method of creating entry points is still compatible but is not recommended from a best practices standpoint as duplicating ./include/MVC/Controller/entry_point_registry.php to ./custom/include/MVC/Controller/entry_point_registry.php will prevent any upgrader updates to ./include/MVC/Controller/entry_point_registry.php from being reflected in the system. Entry point registries contain two properties:
file - The path to the entry point.
auth - A Boolean value that determines whether or not the user must be authenticated in order to access the entry point.
$entry_point_registry['customEntryPoint'] = array( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Entry_Points/Creating_Custom_Entry_Points/index.html |
de54e8e91796-2 | $entry_point_registry['customEntryPoint'] = array(
'file' => 'path/to/customEntryPoint.php',
'auth' => true
);
Example
The first step is to create the actual entry point. This is where all of the logic for your entry point will be located. This file can be located anywhere you choose. For my example, I will create:
./custom/customEntryPoint.php
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
echo "Hello World!";
Next, we will need to create our extension in the application extensions. This will be located at: ./custom/Extension/application/Ext/EntryPointRegistry/customEntryPoint.php
<?php
$entry_point_registry['customEntryPoint'] = array( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Entry_Points/Creating_Custom_Entry_Points/index.html |
de54e8e91796-3 | <?php
$entry_point_registry['customEntryPoint'] = array(
'file' => 'custom/customEntryPoint.php',
'auth' => true
);
Finally, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then generate the file ./custom/application/Ext/EntryPointRegistry/entry_point_registry.ext.php containing your registry entry. We are now able to access our entry point by navigating to:
http://{sugar url}/index.php?entryPoint=customEntryPoint
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Entry_Points/Creating_Custom_Entry_Points/index.html |
25b313cb4d72-0 | Languages
Overview
Sugar as an application platform is internationalized and localizable. Data is stored and presented in the UTF-8 codepage, allowing for all character sets to be used. Sugar provides a language-pack framework that allows developers to build support for any language in the display of user interface labels. Each language pack has its own set of display strings which is the basis of language localization. You can add or modify languages using the information in this guide.Please scroll to the bottom of this page for additional language topics.
Language Keys
Sugar differentiates languages with unique language keys. These keys prefix the files that correspond with particular languages. For example, the default language for the application is English (US), which is represented by the language key en_us. Any file that contains data specific to the English (US) language begins with the characters en_us. Language label keys that are not recognized will default to the English (US) version. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-1 | The following table displays the list of current languages and their corresponding keys:
Language
Language Key
Albanian (Shqip)
sq_AL
Arabic (اÙعربÙØ©)
ar_SA
Bulgarian (ÐÑлгаÑÑки)
bg_BG
Catalan (Català )
ca_ES
Chinese (ç®ä½ä¸æ)
zh_CN
Croatian (Hrvatski)
hr_HR
Czech (Äesky)
cs_CZ
Danish (Dansk)
da_DK
Dutch (Nederlands)
nl_NL | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-2 | da_DK
Dutch (Nederlands)
nl_NL
English (UK)
en_UK
English (US)
en_us
Estonian (Eesti)
et_EE
Finnish (Suomi)
fi_FI
French (Français)
fr_FR
German (Deutsch)
de_DE
Greek (Îλληνικά)
el_EL
Hebrew (×¢×ר×ת)
he_IL
Hungarian (Magyar)
hu_HU
Italian (Italiano)
it_it
Japanese (æ¥æ¬èª)
ja_JP | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-3 | ja_JP
Korean (íêµì´)
ko_KR
Latvian (Latviešu)
lv_LV
Lithuanian (Lietuvių)
lt_LT
Norwegian (Bokmål)
nb_NO
Polish (Polski)
pl_PL
Portuguese (Português)
pt_PT
Portuguese Brazilian (Português Brasileiro)
pt_BR
Romanian (RomânÄ)
ro_RO
Russian (Ð ÑÑÑкий)
ru_RU | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-4 | ru_RU
Serbian (СÑпÑки)
sr_RS
Slovak (SlovenÄina)
sk_SK
Spanish (Español)
es_ES
Spanish (Latin America) (Español (Latinoamérica))
es_LA
Swedish (Svenska)
sv_SE
Thai (à¹à¸à¸¢)
th_TH
Traditional Chinese (ç¹é«ä¸æ)
zh_TW
Turkish (Türkçe)
tr_TR | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-5 | Turkish (Türkçe)
tr_TR
Ukrainian (УкÑаÑнÑÑка)
uk_UA
Â
Change Log
The following table documents historical changes to Sugar's available languages.
Version
Change
7.8.0.0
Added Thai language pack.
7.8.0.0
Added Croatian language pack.
7.7.0.0
Added Traditional Chinese language pack.
7.6.0.0
Added Ukrainian language pack.
7.6.0.0
Added Arabic language pack.
7.2.0
Added Finnish language pack.
7.2.0
Added Spanish (Latin America) language pack.
6.6.0
Added Albanian language pack. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-6 | 6.6.0
Added Albanian language pack.
6.6.0
Added Slovak language pack.
6.6.0
Added Korean language pack.
6.6.0
Added Greek language pack.
6.5.1
Added Latvian language pack.
6.4.0
Added Serbian language pack.
6.4.0
Added Portuguese Brazilian language pack.
6.4.0
Added English (UK) language pack.
6.4.0
Added Catalan language pack.
6.2.0
Added Polish language pack.
6.2.0
Added Hebrew language pack.
6.2.0
Added Estonian language pack.
6.2.0
Added Czech language pack.
6.1.2
Added Turkish language pack.
6.1.2
Added Swedish language pack.
6.1.2 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-7 | 6.1.2
Added Swedish language pack.
6.1.2
Added Norwegian language pack.
6.1.2
Added Lithuanian language pack.
6.1.0
Added Chinese language pack.
6.1.0
Added Russian language pack.
6.1.0
Added Romanian language pack.
6.1.0
Added Portuguese language pack.
6.1.0
Added Dutch language pack.
6.1.0
Added Japanese language pack.
6.1.0
Added Italian language pack.
6.1.0
Added Hungarian language pack.
6.1.0
Added French language pack.
6.1.0
Added Spanish language pack.
6.1.0
Added German language pack.
6.1.0
Added Danish language pack.
6.1.0
Added Bulgarian language pack. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-8 | Added Danish language pack.
6.1.0
Added Bulgarian language pack.
TopicsApplication Labels and ListsSugar, which is fully internationalized and localizable, differentiates languages with unique language keys. These keys prefix the files that correspond with particular languages. For example, the default language for the application is English (US), which is represented by the language key en_us. Any file that contains data specific to the English (US) language begins with the characters en_us. Language label keys that are not recognized will default to the English (US) version.Module Labelsrequire_once 'include/utils.php';Managing ListsThere are three ways to manage lists in Sugar: by using Studio in the application, by directly modifying the list's language strings, and via the code-level Dropdown Helper. This page explains all three methods.Language PacksLanguage packs are module-loadable packages that add support for new, localized languages to Sugar. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
25b313cb4d72-9 | Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/index.html |
b28a7411ff5d-0 | Application Labels and Lists
Overview
Â
Sugar, which is fully internationalized and localizable, differentiates languages with unique language keys. These keys prefix the files that correspond with particular languages. For example, the default language for the application is English (US), which is represented by the language key en_us. Any file that contains data specific to the English (US) language begins with the characters en_us. Language label keys that are not recognized will default to the English (US) version.
For more information on language keys, please refer to the Languages page.
Application Labels and Lists
$app_list_strings and $app_strings | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Application_Labels_and_Lists/index.html |
b28a7411ff5d-1 | Application Labels and Lists
$app_list_strings and $app_strings
The $app_list_strings array contains the various dropdown lists for the system while $app_strings contains the system application labels. The initial set of definitions can be found in ./include/language/<language key>.lang.php. As you work within the system and deploy modules and lists through Studio, any changes to these lists will be reflected in the language's extension directory: ./custom/Extension/application/Ext/Language/<language key>.<list name>.php.
Customizing Application Labels and Lists
If you are developing a customization and want to be able to create or edit existing label or list values, you will need to work within the extension application directory. To do this, create ./custom/Extension/application/Ext/Language/<language key>.<unique name>.php. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Application_Labels_and_Lists/index.html |
b28a7411ff5d-2 | The file should contain your override values with each label index set individually. An example of this is:
<?php
$app_strings['LBL_KEY'] = 'My Display Label';
$app_list_strings['LIST_NAME']['Key_Value'] = 'My Display Value';
Once the file is created with your adjustments, navigate to Admin > Repair > Quick Rebuild & Repair. This will compile all of the Extension files from ./custom/Extension/application/Ext/Language/ to ./custom/application/Ext/Language/<language key>.lang.ext.php.
Hierarchy Diagram
Retrieving Labels | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Application_Labels_and_Lists/index.html |
b28a7411ff5d-3 | Hierarchy Diagram
Retrieving Labels
There are two ways to retrieve a label. The first is to use the translate()Â function found in ./include/utils.php. This function will retrieve the label for the current user's language and can also be used to retrieve labels from $mod_strings, $app_strings, or app_list_strings.
An example of this is:
require_once 'include/utils.php';
$label = translate('LBL_KEY');
Alternatively, you can also use the global variable $app_strings as follows:
global $app_strings;
$label = '';
if (isset($app_strings['LBL_KEY']))
{
$label = $app_strings['LBL_KEY'];
} | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Application_Labels_and_Lists/index.html |
b28a7411ff5d-4 | {
$label = $app_strings['LBL_KEY'];
}
Note: If a label key is not found for the user's preferred language, the system will default to "en_us" and pull the English (US) version of the label for display.Â
Retrieving Lists
There are two ways to retrieve a label. The first is to use the translate() function found in include/utils.php. This function will retrieve the label for the current user's language.
An example of this is:
require_once 'include/utils.php';
$list = translate('LIST_NAME');
//You can also retrieve a specific list value this way
$displayValue = translate('LIST_NAME', '', 'Key_Value');
Alternatively, you can also use the global variable $app_list_strings as follows:
global $app_list_strings;
$list = array(); | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Application_Labels_and_Lists/index.html |
b28a7411ff5d-5 | global $app_list_strings;
$list = array();
if (isset($app_list_strings['LIST_NAME']))
{
$list = $app_list_strings['LIST_NAME'];
}
Note: If a list key is not found for the user's preferred language, the system will default to "en_us" and pull the English (US) version of the list for display.
Accessing Application Strings in Sidecar
All language-pack strings are accessible within the Sidecar framework.
$app_strings
To access $app_strings in Sidecar, use app.lang.getAppString:
app.lang.getAppString('LBL_MODULE');
To access $app_strings in your browser's console, use SUGAR.App.lang.getAppString: | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Application_Labels_and_Lists/index.html |
b28a7411ff5d-6 | SUGAR.App.lang.getAppString('LBL_MODULE');
For more information, please refer to the app.lang.getAppString section of the Languages page.
$app_list_strings
To access $app_list_strings in Sidecar, use app.lang.getAppListStrings:
app.lang.getAppListStrings('sales_stage_dom');
To access $app_list_strings in your browser's console, use SUGAR.App.lang.getAppListStrings:
SUGAR.App.lang.getAppListStrings('sales_stage_dom');
For more information, please refer to the app.lang.getAppListStrings section of the Languages page.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Application_Labels_and_Lists/index.html |
90a191c4e9d7-0 | Managing Lists
Overview
There are three ways to manage lists in Sugar: by using Studio in the application, by directly modifying the list's language strings, and via the code-level Dropdown Helper. This page explains all three methods.
Managing Lists With Studio
If you know the name of the list you would like to edit, you can access the application's dropdown editor by navigating to Admin > Dropdown Editor. Alternatively, navigate to a field that uses the list (Admin > Studio > {Module} > Fields > {field_name}) and click "Edit" under the Dropdown List field:
For information on using the dropdown editor, please refer to the Developer Tools documentation in the Administration Guide.
Directly Modifying Lists
There are two ways to directly modify the language strings. The first way is to modify the custom language file, located at ./custom/include/language/<language key>.lang.php. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Managing_Lists/index.html |
90a191c4e9d7-1 | If you are developing a customization to be distributed and you want to be able to create new or override existing list values, you will need to work within the extension application directory. To do this you will create the following file: ./custom/Extension/application/Ext/Language/<language key>.<unique name>.php.
The file will contain your override values. Please note that within this file you will set each label index individually. An example of this is:
<?php
$app_list_strings['LIST_NAME']['Key_Value'] = 'My Display Value';
Once the file is created with your adjustments, navigate to Admin > Repair > Quick Rebuild & Repair. This will compile all of the Extension files from ./custom/Extension/application/Ext/Language/ to ./custom/application/Ext/Language/<language key>.lang.ext.php.
Managing Lists With Dropdown Helper | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Managing_Lists/index.html |
90a191c4e9d7-2 | Managing Lists With Dropdown Helper
You can use the dropdown helper to manage lists at the code level. This example demonstrates how to add and update values for a specific dropdown list:
require_once 'modules/Studio/DropDowns/DropDownHelper.php';
$dropdownHelper = new DropDownHelper();
$parameters = array();
$parameters['dropdown_name'] = 'example_list';
$listValues = array(
'Key_Value_1' => 'Display Value 1',
'Key_Value_2' => 'Display Value 2',
'Key_Value_3' => 'Display Value 3'
);
$count = 0;
foreach ($listValues as $key=>$value) {
$parameters['slot_'. $count] = $count;
$parameters['key_'. $count] = $key; | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Managing_Lists/index.html |
90a191c4e9d7-3 | $parameters['key_'. $count] = $key;
$parameters['value_'. $count] = $value;
//set 'use_push' to true to update/add values while keeping old values
$parameters['use_push'] = true;
$count++;
}
$dropdownHelper->saveDropDown($parameters);
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Managing_Lists/index.html |
35b77ed6aad6-0 | Module Labels
require_once 'include/utils.php';
$label = translate('LBL_KEY', 'Accounts');
Overview
Sugar, which is fully internationalized and localizable, differentiates languages with unique language keys. These keys prefix the files that correspond to particular languages. For example, the default language for the application is English (US), which is represented by the language key en_us. Any file that contains data specific to the English (US) language begins with the characters en_us. Language label keys that are not recognized will default to the English (US) version.
For more information on language keys, please refer to the Languages page.
Module Labels
$mod_strings | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Module_Labels/index.html |
35b77ed6aad6-1 | Module Labels
$mod_strings
The module language strings are stored in $mod_strings. This section explains how the $mod_strings are compiled. All modules, whether out-of-box or custom, will have an initial set of language files in ./modules/<module>/language/<language key>.lang.php.
As you work with the system and modify labels through Studio, changes to the labels are reflected in the corresponding module's custom extension directory: ./custom/Extension/modules/<module>/Ext/Language/<language key>.lang.php.
Customizing Labels
If you are developing a customization and want to be able to create new or override existing label values, you will need to work within the extension modules directory. To do this, create ./custom/Extension/modules/<module>/Ext/Language/<language key>.<unique_name>.php. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Module_Labels/index.html |
35b77ed6aad6-2 | The file should contain your override values with each label index set individually. An example of this is:
<?php
$mod_strings['LBL_KEY'] = 'My Display Label';
Once the file is created with your adjustments, navigate to Admin > Repair > Quick Rebuild & Repair. This will compile all of the Extension files from ./custom/Extension/modules/<module>/Ext/Language/ to ./custom/modules/<module>/Ext/Language/<language key>.lang.ext.php.
Label Cache
The file locations discussed above are compiled into the cache directory, ./cache/modules/<module>/language/<language key>.lang.php
The cached results of these files make up each module's $mod_strings definition.
Hierarchy Diagram
Retrieving Labels | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Module_Labels/index.html |
35b77ed6aad6-3 | Hierarchy Diagram
Retrieving Labels
There are two ways to retrieve a label. The first is to use the translate() function found in include/utils.php. This function will retrieve the label for the current user's language and can also be used to retrieve labels from $mod_strings, $app_strings, or app_list_strings.
An example of this is:
require_once 'include/utils.php';
$label = translate('LBL_KEY', 'Accounts');
Alternatively, you can use the global variable $mod_strings as follows:
global $mod_strings;
$label = '';
if (isset($mod_strings['LBL_KEY']))
{
$label = $mod_strings['LBL_KEY'];
}
Accessing Module Strings in Sidecar
All language-pack strings are accessible within the Sidecar framework. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Module_Labels/index.html |
35b77ed6aad6-4 | All language-pack strings are accessible within the Sidecar framework.
$mod_strings
To access the $mod_strings in Sidecar, use app.lang.get():
app.lang.get('LBL_NAME', 'Accounts');
To access the $mod_strings in your browser's console, use SUGAR.App.lang.get():
SUGAR.App.lang.get('LBL_NAME', 'Accounts');
For more information, please refer to the app.lang.get section of the Languages page.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Module_Labels/index.html |
4939b98642f5-0 | Language Packs
Overview
Language packs are module-loadable packages that add support for new, localized languages to Sugar.
Creating a Language Pack
To create a language pack, choose a unique language key. This key is specific to your language definitions and should be unique from other language keys in the same instance to avoid conflicts. It is also important that your language key follows the xx_xx format. For demonstrative purposes, we will create a Lorem Ipsum language pack with the language key Lo_Ip.
Application and Module Strings | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-1 | Application and Module Strings
In the module and application language definitions, there is a combination of $app_list_strings, $mod_strings, and $mod_process_order_strings variables. Your custom language needs to have a definition created to reflect each language key in a standard definition. To do this, duplicate an existing language and simply change the language values within the document and replace the language key in the name of the file with your new key. Be sure to only change the array values and leave the array keys as they are inside of each file.
Note: Should you miss an index, it will default to English. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-2 | Note:Â Should you miss an index, it will default to English.Â
The first step is to identify all of the application and module language files. While language files may vary from version to version due to new features, the stock language paths are generally as follows:
./include/language/xx_xx.lang.php
./include/SugarObjects/implements/assignable/language/xx_xx.lang.php
./include/SugarObjects/implements/email_address/language/xx_xx.lang.php
./include/SugarObjects/implements/team_security/language/xx_xx.lang.php
./include/SugarObjects/templates/basic/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-3 | ./include/SugarObjects/templates/company/language/xx_xx.lang.php
./include/SugarObjects/templates/company/language/application/xx_xx.lang.php
./include/SugarObjects/templates/file/language/xx_xx.lang.php
./include/SugarObjects/templates/file/language/application/xx_xx.lang.php
./include/SugarObjects/templates/issue/language/xx_xx.lang.php
./include/SugarObjects/templates/issue/language/application/xx_xx.lang.php
./include/SugarObjects/templates/person/language/xx_xx.lang.php
./include/SugarObjects/templates/sale/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-4 | ./include/SugarObjects/templates/sale/language/application/xx_xx.lang.php
./install/language/xx_xx.lang.php
./modules/Accounts/language/xx_xx.lang.php
./modules/ACL/language/xx_xx.lang.php
./modules/ACLActions/language/xx_xx.lang.php
./modules/ACLFields/language/xx_xx.lang.php
./modules/ACLRoles/language/xx_xx.lang.php
./modules/Activities/language/xx_xx.lang.php
./modules/ActivityStream/Activities/language/xx_xx.lang.php
./modules/Administration/language/xx_xx.lang.php
./modules/Audit/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-5 | ./modules/Audit/language/xx_xx.lang.php
./modules/Bugs/language/xx_xx.lang.php
./modules/Calendar/language/xx_xx.lang.php
./modules/Calls/language/xx_xx.lang.php
./modules/CampaignLog/language/xx_xx.lang.php
./modules/Campaigns/language/xx_xx.lang.php
./modules/CampaignTrackers/language/xx_xx.lang.php
./modules/Cases/language/xx_xx.lang.php
./modules/Charts/language/xx_xx.lang.php
./modules/Configurator/language/xx_xx.lang.php
./modules/Connectors/language/xx_xx.lang.php
./modules/Contacts/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-6 | ./modules/Contacts/language/xx_xx.lang.php
./modules/Contracts/language/xx_xx.lang.php
./modules/ContractTypes/language/xx_xx.lang.php
./modules/Currencies/language/xx_xx.lang.php
./modules/CustomQueries/language/xx_xx.lang.php
./modules/DataSets/language/xx_xx.lang.php
./modules/DocumentRevisions/language/xx_xx.lang.php
./modules/Documents/language/xx_xx.lang.php
./modules/DynamicFields/language/xx_xx.lang.php
./modules/EAPM/language/xx_xx.lang.php
./modules/EmailAddresses/language/xx_xx.lang.php
./modules/EmailMan/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-7 | ./modules/EmailMan/language/xx_xx.lang.php
./modules/EmailMarketing/language/xx_xx.lang.php
./modules/Emails/language/xx_xx.lang.php
./modules/EmailTemplates/language/xx_xx.lang.php
./modules/Employees/language/xx_xx.lang.php
./modules/ExpressionEngine/language/xx_xx.lang.php
./modules/Expressions/language/xx_xx.lang.php
./modules/Feedbacks/language/xx_xx.lang.php
./modules/Filters/language/xx_xx.lang.php
./modules/ForecastManagerWorksheets/language/xx_xx.lang.php
./modules/Forecasts/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-8 | ./modules/Forecasts/language/xx_xx.lang.php
./modules/ForecastWorksheets/language/xx_xx.lang.php
./modules/Groups/language/xx_xx.lang.php
./modules/Help/language/xx_xx.lang.php
./modules/History/language/xx_xx.lang.php
./modules/Holidays/language/xx_xx.lang.php
./modules/Home/language/xx_xx.lang.php
./modules/Import/language/xx_xx.lang.php
./modules/InboundEmail/language/xx_xx.lang.php
./modules/KBDocuments/language/xx_xx.lang.php
./modules/KBTags/language/xx_xx.lang.php
./modules/LabelEditor/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-9 | ./modules/LabelEditor/language/xx_xx.lang.php
./modules/Leads/language/xx_xx.lang.php
./modules/MailMerge/language/xx_xx.lang.php
./modules/Manufacturers/language/xx_xx.lang.php
./modules/Meetings/language/xx_xx.lang.php
./modules/MergeRecords/language/xx_xx.lang.php
./modules/ModuleBuilder/language/xx_xx.lang.php
./modules/Notes/language/xx_xx.lang.php
./modules/Notifications/language/xx_xx.lang.php
./modules/OAuthKeys/language/xx_xx.lang.php
./modules/OAuthTokens/language/xx_xx.lang.php
./modules/Opportunities/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-10 | ./modules/Opportunities/language/xx_xx.lang.php
./modules/OptimisticLock/language/xx_xx.lang.php
./modules/PdfManager/language/xx_xx.lang.php
./modules/pmse_Business_Rules/language/xx_xx.lang.php
./modules/pmse_Emails_Templates/language/xx_xx.lang.php
./modules/pmse_Inbox/language/xx_xx.lang.php
./modules/pmse_Project/language/xx_xx.lang.php
./modules/ProductBundleNotes/language/xx_xx.lang.php
./modules/ProductBundles/language/xx_xx.lang.php
./modules/ProductCategories/language/xx_xx.lang.php
./modules/Products/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-11 | ./modules/Products/language/xx_xx.lang.php
./modules/ProductTemplates/language/xx_xx.lang.php
./modules/ProductTypes/language/xx_xx.lang.php
./modules/Project/language/xx_xx.lang.php
./modules/ProjectTask/language/xx_xx.lang.php
./modules/ProspectLists/language/xx_xx.lang.php
./modules/Prospects/language/xx_xx.lang.php
./modules/Quotas/language/xx_xx.lang.php
./modules/Quotes/language/xx_xx.lang.php
./modules/Relationships/language/xx_xx.lang.php
./modules/Releases/language/xx_xx.lang.php
./modules/ReportMaker/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-12 | ./modules/ReportMaker/language/xx_xx.lang.php
./modules/Reports/language/xx_xx.lang.php
./modules/RevenueLineItems/language/xx_xx.lang.php
./modules/Roles/language/xx_xx.lang.php
./modules/SavedSearch/language/xx_xx.lang.php
./modules/Schedulers/language/xx_xx.lang.php
./modules/SchedulersJobs/language/xx_xx.lang.php
./modules/Shippers/language/xx_xx.lang.php
./modules/SNIP/language/xx_xx.lang.php
./modules/Studio/language/xx_xx.lang.php
./modules/Styleguide/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-13 | ./modules/Styleguide/language/xx_xx.lang.php
./modules/SugarFavorites/language/xx_xx.lang.php
./modules/Sync/language/xx_xx.lang.php
./modules/Tasks/language/xx_xx.lang.php
./modules/TaxRates/language/xx_xx.lang.php
./modules/TeamNotices/language/xx_xx.lang.php
./modules/Teams/language/xx_xx.lang.php
./modules/TimePeriods/language/xx_xx.lang.php
./modules/Trackers/language/xx_xx.lang.php
./modules/UpgradeWizard/language/xx_xx.lang.php
./modules/Users/language/xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-14 | ./modules/Users/language/xx_xx.lang.php
./modules/UserSignatures/language/xx_xx.lang.php
./modules/WebLogicHooks/language/xx_xx.lang.php
./modules/WorkFlow/language/xx_xx.lang.php
./modules/WorkFlowActions/language/xx_xx.lang.php
./modules/WorkFlowActionShells/language/xx_xx.lang.php
./modules/WorkFlowAlerts/language/xx_xx.lang.php
./modules/WorkFlowAlertShells/language/xx_xx.lang.php
./modules/WorkFlowTriggerShells/language/xx_xx.lang.php
Dashlet Strings | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-15 | Dashlet Strings
Dashlet strings are mostly specific to BWC dashboards. Within each dashlet language definition is a $dashletStrings variable. Create a definition to mimic each dashlet file to reflect the new language. To do this, duplicate an existing language of your choice and change the language key in the path. Be sure to only change the array values and leave the array keys as they are inside of each file.
The dashlet paths are listed below:
./modules/Calendar/Dashlets/CalendarDashlet/CalendarDashlet.xx_xx.lang.php
./modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-16 | ./modules/Charts/Dashlets/MyModulesUsedChartDashlet/MyModulesUsedChartDashlet.xx_xx.lang.php
./modules/Charts/Dashlets/MyOpportunitiesGaugeDashlet/MyOpportunitiesGaugeDashlet.xx_xx.lang.php
./modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.xx_xx.lang.php
./modules/Charts/Dashlets/MyTeamModulesUsedChartDashlet/MyTeamModulesUsedChartDashlet.xx_xx.lang.php
./modules/Charts/Dashlets/OpportunitiesByLeadSourceByOutcomeDashlet/OpportunitiesByLeadSourceByOutcomeDashlet.xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-17 | ./modules/Charts/Dashlets/OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.xx_xx.lang.php
./modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.xx_xx.lang.php
./modules/Charts/Dashlets/PipelineBySalesStageDashlet/PipelineBySalesStageDashlet.xx_xx.lang.php
./modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.xx_xx.lang.php
./modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.xx_xx.lang.php
./modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.xx_xx.lang.php | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-18 | ./modules/Home/Dashlets/RSSDashlet/RSSDashlet.xx_xx.lang.php
./modules/SugarFavorites/Dashlets/SugarFavoritesDashlet/SugarFavoritesDashlet.xx_xx.lang.php
./modules/TeamNotices/Dashlets/TeamNoticesDashlet/TeamNoticesDashlet.xx_xx.lang.php
./modules/Trackers/Dashlets/TrackerDashlet/TrackerDashlet.xx_xx.lang.php
Templates
Sugar also contains templates that are used when emailing users. Duplicate an existing language template and change the language text as needed. This time, you will need to leave the language keys exactly as they are in the file.
The template paths are listed below:
./include/language/xx_xx.notify_template.html
Configuration | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-19 | ./include/language/xx_xx.notify_template.html
Configuration
Once you have your language definitions ready, you will need to tell Sugar a new language should be listed for users. For development purposes, you can add $sugar_config['languages']['Lo_Ip'] = 'Lorem Ipsum'; to your config_override.php. It is important to note that this language configuration will automatically be set for you during the installation of a module loadable language package.Â
Module Loadable Packages | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-20 | Module Loadable Packages
Once you have the new language files ready, create an installer package so the files can be installed to a new instance. To do this, create an empty directory and move the files into it, mimicking the folder structures shown above. Once that is completed, create a manifest.php in the root of the new directory with a $manifest['type'] of "langpack". An example manifest file is shown below this section. For more information on building manifests, please visit the introduction to the manifest page.
Note: Sugar Sell Essentials customers do not have the ability to upload custom file packages to Sugar using Module Loader.
Example Manifest File
<?php
$manifest = array (
'acceptable_sugar_versions' =>
array (
'regex_matches' =>
array (
'13.0.*',
),
), | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-21 | array (
'13.0.*',
),
),
'acceptable_sugar_flavors' =>
array (
'PRO',
'ENT',
'ULT',
),
'readme' => '',
'key' => 1454474352,
'author' => 'SugarCRM',
'description' => 'Installs an example Lorem Ipsum language pack',
'icon' => '',
'is_uninstallable' => true,
'name' => 'Lorem Ipsum Language Pack',
'published_date' => '2018-02-03 00:00:00',
'type' => 'langpack',
'version' => 1454474352,
'remove_tables' => '',
);
?> | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
4939b98642f5-22 | 'remove_tables' => '',
);
?>
Once your manifest is completed, you will need to zip up the contents of your new folder. An example of a language pack installer can be downloaded here. When your language pack is ready, it can be installed through the module loader. The installation will automatically add your new language to the $sugar_config['languages'] array in your config.php. After installation. it is highly recommended to navigate to the Sugar Administration page, click on "Repairs", and execute the following repair tools:
Quick Repair and Rebuild
Rebuild Javascript Languages
The new language should now be available for use in your Sugar instance. If you do not see the language listed, please clear your browser cache and refresh the page.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Languages/Language_Packs/index.html |
7b610a4ad490-0 | Extensions
Overview
The extension framework, defined in ./ModuleInstall/extensions.php, provides the capability to modify Sugar metadata such as vardefs and layouts in a safe way that supports installing, uninstalling, enabling, and disabling without interfering with other customizations. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
7b610a4ad490-1 | Application extensions are stored under ./custom/Extension/application/Ext/ and module extensions are under ./custom/Extension/modules/<module>/Ext/. The files in each of these directories are aggregated into a single file with a predefined name for the system to use. An example of this is the vardefs extension. The vardef extension directory for Accounts is located in ./custom/Extension/modules/Accounts/Ext/Vardefs/. When a module is installed, uninstalled, enabled, or disabled, the files contained in this directory are merged into ./custom/modules/Accounts/Ext/Vardefs/vardefs.ext.php. A Quick Repair & Rebuild will also cause the files to merge.
The core extension mappings are listed in the Topics section at the bottom of this page.
Extensions Properties
Each extension contains the following properties:
Property
Description
Extension Scope | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
7b610a4ad490-2 | Extensions Properties
Each extension contains the following properties:
Property
Description
Extension Scope
All : Extension can be applied to the ./custom/application/ or ./custom/<module>/ directory
Application : Extension can only be applied to the ./custom/application/ directory
Module : Extension can only be applied to the ./custom/<module>/ directory
Definition Variable
The variable that Sugar for utilizing the extension definition. If defined, this variable must be set with the appropriate definition properties.
Extension Directory
The directory that the extension compiles files from
If the customization is for the application, the extension file should be placed in ./custom/Extension/application/Ext/<extension_directory>/
If the customization is for a module, the extension file should be placed in ./custom/Extension/modules/<module>/Ext/<extension_directory>/ | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
7b610a4ad490-3 | Compiled Extension File
The name of the compiled extension file
If the extension is for the application, the compiled file will be located in ./custom/application/Ext/<extension>/<extension>.ext.php
If the extension is for a module, the compiled file will be located in ./custom/modules/<module>/Ext/<extension>/<extension>.ext.php
Manifest Installdef
The index of the $installdef in the manifest file for module loadable packages. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
7b610a4ad490-4 | TopicsActionFileMapThe ActionFileMap extension maps actions to files, which helps you map a file to a view outside of ./custom/modules/<module>/views/view.<name>.php. This page is only applicable to modules running in backward compatibility mode.ActionReMapThe ActionReMap extension maps new actions to existing actions. This extension is only applicable to modules running in backward compatibility mode.ActionViewMapThe ActionViewMap extension maps additional actions for a module.AdministrationThe Administration extension adds new panels to Sugar's Administration page.Application SchedulersApplication Scheduler extensions add custom functions that can be used by scheduler jobs.ConsoleThe Console extension adds custom CLI commands to Sugar. More information on creating custom commands can be found in the CLI documentation.DependenciesDependencies create dependent actions for fields and forms that can leverage more complicated logic.EntryPointRegistryThe EntryPointRegistry extension maps additional entry points to the system. Please note that entry | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
7b610a4ad490-5 | EntryPointRegistry extension maps additional entry points to the system. Please note that entry points will soon be deprecated. Developers should move custom logic to endpoints. For more information, please refer to the Entry Points page.ExtensionsThis extension allows for developers to create custom extensions within the framework. Custom extensions are used alongside the extensions found in ./ModuleInstaller/extensions.php.FileAccessControlMapThe FileAccessControlMap extension restricts specific view actions from users of the system.IncludeThe Modules extension maps additional modules in the system, typically when Module Builder deploys a module.JSGroupingsThe JSGroupings extension allows for additional JavaScript grouping files to be created or added to existing groupings within the system.LanguageThe Language extension adds or overrides language strings.LayoutdefsThe Layoutdefs extension adds or overrides subpanel definitions.LogicHooksThe LogicHooks extension adds actions to specific events such as, for example, before saving a bean. For | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
7b610a4ad490-6 | extension adds actions to specific events such as, for example, before saving a bean. For more information on logic hooks in Sugar, please refer to the Logic Hooks documentation.ModulesThe Modules extension maps additional modules in the system, typically when Module Builder deploys a module.PlatformsThe Platforms extension adds allowed REST API platforms when restricting custom platforms through the use of the disable_unknown_platforms configuration setting.ScheduledTasksThe ScheduledTasks extension adds custom functions that can be used by scheduler jobs. For more information about schedulers in Sugar, please refer to the Schedulers documentation.SidecarThe Sidecar extension installs metadata files to their appropriate directories.TinyMCEThe TinyMCE extension affects the TinyMCE WYSIWYG editor's configuration for backward compatible modules such as PDF Manager and Campaign Email Templates.UserPageThe UserPage extension adds sections to the User Management view.UtilsThe Utils extension adds | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
7b610a4ad490-7 | UserPage extension adds sections to the User Management view.UtilsThe Utils extension adds functions to the global utility function list.VardefsThe Vardefs extension adds or overrides system vardefs, which provide the Sugar application with information about SugarBeans.WirelessLayoutdefsThe WirelessLayoutdefs extension adds additional subpanels to wireless views. This extension is only applicable to modules running in backward compatibility mode.WirelessModuleRegistryThe WirelessModuleRegistry extension adds modules to the available modules for mobile. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
7b610a4ad490-8 | Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/index.html |
cea4ebfdb629-0 | Platforms
Overview
The Platforms extension adds allowed REST API platforms when restricting custom platforms through the use of the disable_unknown_platforms configuration setting.
Properties
The following extension properties are available. For more information, please refer to the Extension Property documentation.
Property
Value
Extension Scope
Application
Extension Directory
./custom/Extension/application/Ext/Platforms/
Compiled Extension File
./custom/application/Ext/Platforms/platforms.ext.php
Manifest Installdef
$installdefs['platforms']
Implementation
The following sections illustrate the various ways to implement a new platform type to a Sugar instance.
File System | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Platforms/index.html |
cea4ebfdb629-1 | File System
When working directly with the filesystem, enable the disable_unknown_platforms configuration by setting $sugar_config['disable_unknown_platforms'] = true in your ./config_override.php. This will prevent the system from allowing unknown platform types from accessing the rest endpoints. Next, create a file in ./custom/Extension/application/Ext/Platforms/ to map a new platform in the system. The following example adds a new platform called 'integration' that can be used throughout the system:
./custom/Extension/application/Ext/Platforms/<file>.php
<?php
$platforms[] = 'integration'; | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Platforms/index.html |
cea4ebfdb629-2 | <?php
$platforms[] = 'integration';
Finally, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and your customizations will be compiled into ./custom/application/Ext/Platforms/platforms.ext.php.
Alternatively, platforms can also be added by creating ./custom/clients/platforms.php and appending new platform types to the $platforms variable. This method of creating platforms is still compatible but is not recommended from a best practices standpoint.
Once installed, developers can take advantage of the new platform type when authenticating with the REST API oauth2/token endpoint. An example is shown below:Â
{
"grant_type": "password",
"username": "admin",
"password": "password", | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Platforms/index.html |
cea4ebfdb629-3 | "username": "admin",
"password": "password",
"client_id": "sugar",
"client_secret": "",
"platform": "integration"
}
Module Loadable Package
When building a module loadable package, you can use the $installdefs['platforms'] index to install the extension file.
Installdef Properties
Name
Type
Description
from
String
The base path of the file to be installed
The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the utils to the system. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new utils in the system.
./manifest.php
<?php
$manifest = array(
...
);
$installdefs = array( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Platforms/index.html |
cea4ebfdb629-4 | ...
);
$installdefs = array(
'id' => 'Platforms_Example',
'platforms' => array(
array(
'from' => '<basepath>/Files/custom/Extension/application/Ext/Platforms/<file>.php',
)
)
);
Alternatively, you may use the $installdefs['copy'] index to copy the file. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. For more information on the $installdefs['copy'] index and module-loadable packages, please refer to the Introduction to the Manifest page.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Platforms/index.html |
48e99cccc8f4-0 | This page refers to content that is only available in modules running in backward compatibility mode.
ActionViewMap
Overview
The ActionViewMap extension maps additional actions for a module.
Note: Actions that apply to modules running in backward compatibility mode are mapped in ./custom/modules/<module>/controller.php.
Properties
The following extension properties are available. For more information, please refer to the Extension Property documentation.
Property
Value
Extension Scope
Module
Sugar Variable
$action_view_map
Extension Directory
./custom/Extension/modules/<module>/Ext/ActionViewMap/
Compiled Extension File
./custom/<module>/Ext/ActionViewMap/action_view_map.ext.php
Manifest Installdef
$installdefs['action_view_map']
Implementation | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html |
48e99cccc8f4-1 | $installdefs['action_view_map']
Implementation
The following sections illustrate the various ways to implement a customization to a Sugar instance.
File System
When working directly with the filesystem, you can create a file in ./custom/Extension/modules/<module>/Ext/ActionViewMap/ to map a new view in the system. The following example will map a new action called 'example' to the 'example' view:
./custom/Extension/modules/<module>/Ext/ActionViewMap/<file>.php
<?php
$action_view_map['example'] = 'example';
./custom/modules/<module>/views/view.example.php
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html |
48e99cccc8f4-2 | require_once('include/MVC/View/views/view.detail.php');
class <module>ViewExample extends ViewDetail
{
function <module>ViewExample()
{
parent::ViewDetail();
}
function display()
{
echo 'Example View';
}
}
?>
Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/ActionViewMap/action_view_map.ext.php.
Module Loadable Package
When building a module-loadable package, use the $installdefs['action_view_map'] index to install the extension file.
Installdef Properties
Name
Type
Description
from
String
The basepath of the file
to_module
String | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html |
48e99cccc8f4-3 | Description
from
String
The basepath of the file
to_module
String
The key for the module where the file will be installed
The example below demonstrates the proper install definition for the ./manifest.php file in order to add the Action View Map file to a specific module. You should note that when using this approach, you still need to use the $installdefs['copy'] index for the View file, however, Sugar will automatically execute Rebuild Extensions to reflect the new Action View in the system.
./manifest.php
<?php
$manifest = array(
...
);
$installdefs = array(
'id' => 'actionView_example',
'action_view_map' => array(
array( | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html |
48e99cccc8f4-4 | 'action_view_map' => array(
array(
'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/ActionViewMap/<file>.php',
'to_module' => '<module>',
)
),
'copy' => array(
array(
'from' => '<basepath>/Files/custom/modules/<module>/views/view.example.php',
'to' => 'custom/modules/<module>/views/view.example.php',
),
)
);
Alternatively, you may use the $installdefs['copy'] index for the Action View Map Extension file. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html |
48e99cccc8f4-5 | For more information on module-loadable packages, please refer to the Introduction to the Manifest page .
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionViewMap/index.html |
3606ad2259c6-0 | Console
Overview
The Console extension adds custom CLI commands to Sugar. More information on creating custom commands can be found in the CLI documentation.
Properties
The following extension properties are available. For more information, please refer to the Extension Property documentation.
Property
Value
Extension Scope
Application
Extension Directory
./custom/Extension/application/Ext/Console/
Compiled Extension File
./custom/application/Ext/Console/console.ext.php
Manifest Installdef
$installdefs['console']
Implementation
The following sections illustrate the various ways to implement a customization to a Sugar instance.
File System
To create a Sugar console extension, please refer to our CLI documentation.
Module Loadable Package
When building a module loadable package, you can use the $installdefs['console'] index to install the extension file. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Console/index.html |
3606ad2259c6-1 | Installdef Properties
Name
Type
Description
from
String
The basepath of the file to be installed.
The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the console command.Â
./manifest.php
<?php
$manifest = array(
...
);
$installdefs = array (
'id' => 'console_Example',
'console' => array(
array(
'from' => '<basepath>/Files/custom/Extension/application/Ext/Console/RegisterHelloWorldCommand.php'
)
),
'copy' => array (
0 => array (
'from' => '<basepath>/Files/custom/src/Console/Command/HelloWorldCommand.php', | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Console/index.html |
3606ad2259c6-2 | 'to' => 'custom/src/Console/Command/HelloWorldCommand.php',
),
),
);
Alternatively, you may use the $installdefs['copy'] index to copy the file. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. For more information on the $installdefs['copy'] index and module-loadable packages, please refer to the Introduction to the Manifest page.
Download the module loadable example package here.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Console/index.html |
712341a2b091-0 | This page refers to content that is only available in modules running in backward compatibility mode.
ActionFileMap
Overview
The ActionFileMap extension maps actions to files, which helps you map a file to a view outside of ./custom/modules/<module>/views/view.<name>.php. This page is only applicable to modules running in backward compatibility mode.
Properties
The following extension properties are available. For more information, please refer to the Extension Property documentation.
Property
Value
Extension Scope
Module
Sugar Variable
$action_file_map
Extension Directory
./custom/Extension/modules/<module>/Ext/ActionFileMap/
Compiled Extension File
./custom/<module>/Ext/ActionFileMap/action_file_map.ext.php
Manifest Installdef
$installdefs['action_file_map']
Implementation | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionFileMap/index.html |
712341a2b091-1 | $installdefs['action_file_map']
Implementation
The following sections illustrate the various ways to implement a customization to a Sugar instance.
File System
When working directly with the filesystem, you can create a file in ./custom/Extension/modules/<module>/Ext/ActionFileMap/ to map a new action in the system. The following example will create a new action called "example" in a module:
./custom/Extension/modules/<module>/Ext/ActionFileMap/<file>.php
<?php
$action_file_map['new_action'] = 'custom/modules/<module>/new_action.php';
Next, create your action file:
./custom/modules/<module>/new_action.php
<?php
//Encoded as JSON for AJAX layouts
echo '{"content":"Example View"}';
?> | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionFileMap/index.html |
712341a2b091-2 | echo '{"content":"Example View"}';
?>
Next, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and compile your customization into ./custom/modules/<module>/Ext/ActionFileMap/action_file_map.ext.php
Module Loadable Package
When building a module-loadable package, you can use the $installdefs['action_file_map'] index to install the extension file.Â
Installdef Properties
Name
Type
Description
from
String
The basepath of the file to be installed.Â
to_module
String
The key of the module the file is to be installed to. | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionFileMap/index.html |
712341a2b091-3 | to_module
String
The key of the module the file is to be installed to.
The example below demonstrates the proper install definition that should be used in the ./manifest.php file in order to add the Action File Map file to a specific module. You should note that when using this approach, you still need to use the $installdefs['copy'] index for the Action file, but Sugar will automatically execute Rebuild Extensions to reflect the new Action in the system.
./manifest.php
<?php
$manifest = array(
...
);
$installdefs = array(
'id' => 'ActionRemap_Example',
'action_file_map' => array(
array(
'from' => '<basepath>/Files/custom/Extension/modules/<module>/Ext/ActionFileMap/<file>.php', | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionFileMap/index.html |
712341a2b091-4 | 'to_module' => '<module>',
)
),
'copy' => array(
array(
'from' => '<basepath>/Files/custom/example.php',
'to' => 'custom/example.php'
)
)
);
Alternatively, you may use the $installdefs['copy'] index for the Action File Map Extension file. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. For more information on the $installdefs['copy'] index and module-loadable packages, please refer to the Introduction to the Manifest page.
Last modified: 2023-02-03 21:04:03 | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/ActionFileMap/index.html |
075fa58ba813-0 | Administration
Overview
The Administration extension adds new panels to Sugar's Administration page.
Properties
The following extension properties are available. For more information, please refer to the Extension Property documentation.
Property
Value
Extension Scope
Module: Administration
Sugar Variable
$admin_group_header
Extension Directory
./custom/Extension/modules/Administration/Ext/Administration/
Compiled Extension File
./custom/modules/Administration/Ext/Administration/administration.ext.php
Manifest Installdef
$installdefs['administration']
Implementation
The following sections illustrate the various ways to implement a customization to a Sugar instance.
File System | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Administration/index.html |
075fa58ba813-1 | File System
When working directly with the filesystem, you can create a file in ./custom/Extension/modules/Administration/Ext/Administration/<file>.php to add new Administration Links in the system. The following example will add a new panel to the Administration page called "Example Admin Panel", which will contain one link called "Example Link":
The following example will create a new admin panel:
./custom/Extension/modules/Administration/Ext/Administration/<file>.php
<?php
$admin_option_defs = array();
$admin_option_defs['Administration']['<section key>'] = array(
//Icon name. Available icons are located in ./themes/default/images
'Administration',
//Link name label
'LBL_LINK_NAME',
//Link description label | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Administration/index.html |
075fa58ba813-2 | 'LBL_LINK_NAME',
//Link description label
'LBL_LINK_DESCRIPTION',
//Link URL - For Sidecar modules
'javascript:parent.SUGAR.App.router.navigate("<module>/<path>", {trigger: true});',
//Alternatively, if you are linking to BWC modules
//'./index.php?module=<module>&action=<action>',
);
$admin_group_header[] = array(
//Section header label
'LBL_SECTION_HEADER',
//$other_text parameter for get_form_header()
'',
//$show_help parameter for get_form_header()
false,
//Section links
$admin_option_defs,
//Section description label | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Administration/index.html |
075fa58ba813-3 | $admin_option_defs,
//Section description label
'LBL_SECTION_DESCRIPTION'
);
Next, we will populate the panel label values:
./custom/Extension/modules/Administration/Ext/Language/en_us.<name>.php
<?php
$mod_strings['LBL_LINK_NAME'] = 'Example Link';
$mod_strings['LBL_LINK_DESCRIPTION'] = 'Link Description';
$mod_strings['LBL_SECTION_HEADER'] = 'Example Admin Panel';
$mod_strings['LBL_SECTION_DESCRIPTION'] = 'Section Description'; | https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_13.0/Architecture/Extensions/Administration/index.html |