Localizing the My Cloud Services console
Note
The functionality referenced in this topic applies to version 4.5 and earlier.
You can localize the strings, dates, currency values, and numbers in the My Cloud Services console for languages other than U.S. English. Or you can create your own key/value file as needed.
The locale used in the My Cloud Services console is based on your browser's language setting. Pay attention to the following qualifications:
- If the key/value file is available for your locale, then text and dates are displayed in the language and date format appropriate for that language. Otherwise, the text and date format defaults to U.S. English.
The currency symbol displayed is whatever the user chooses when the user created the offering.
- The format of the currency value and numbers displayed depends on the browser's language setting.
With the exception of the status value, data is not translated by your browser's language setting. Rather, data is displayed in the language in which it was entered.
This topic contains the following information:
Before you begin
Note
Back up your VM or your file system before you start. If you make a mistake, you can revert to a saved snapshot and try again.
- Verify that your configuration specifies the default location property of the custom directory.
For example: com.bmc.cloud.ui.custom.resource.dir=installDirectoryr/custom
If that property is missing and not properly configured, you will not see your changes. Add this property with your custom directory as the value if it is missing. Depending on how you installed the My Cloud Services console (clmui), verify that the custom directory is set:- If you installed the My Cloud Services console (clmui) on its own host, open the Config.properties file (by default, /opt/bmc/CloudPortalWebApplication/tomcat/webapps/clmui/WEB-INF/classes or C:\Program Files\BMC Software\CloudPortalWebApplication\tomcat\webapps\clmui\WEB-INF\classes).
You should see the following property and value:
com.bmc.cloud.ui.custom.resource.dir=installDirectoryr/custom (Linux)
com.bmc.cloud.ui.custom.resource.dir=installDirectoryr\\custom (Windows – you must include the double backslash as the default separator)
For example:
com.bmc.cloud.ui.custom.resource.dir=/opt/bmc/CloudPortalWebApplication/Cloud_UI/custom (Linux)
com.bmc.cloud.ui.custom.resource.dir=C:\\Program Files\\BMC Software\\CloudPortalWebApplication\\Cloud_UI\\custom (Windows – includes the double backslash as the default separator) If you did not install the My Cloud Services console (clmui) on its own host but on the Platform Manager host, open the cloudservices.json file (by default, C:\Program Files\BMC Software\BMCCloudLifeCycleManagement\Platform_Manager\configuration\cloudservices.json).
In the CustomDir section, you should see the attributeValue property whose value is the custom directory:{ "cloudClass" : "com.bmc.cloud.model.beans.AccessAttribute", "datatype" : "String", "description" : "Directory that contains customization web content", "guid" : "780a47aa-d6a9-4894-9aa5-a5fa2ce26cb1", "hasValueObject" : [ { "cloudClass" : "com.bmc.cloud.model.beans.AccessAttributeValue", "attributeValue" : "C:\\Program Files\\BMC Software \\BMCCloudLifeCycleManagement\\Cloud_UI\\custom", "guid" : "8b03984d-7750-4ba2-a8f7-8f7ef48fb43d", "name" : "CustomDir" } ], "isOptional" : true, "isPassword" : false, "modifiableWithoutRestart" : false, "name" : "CustomDir" }
Note
If the attributeValue property is missing or if it has no value or if the directory separator is a single backslash (\), update it to specify your custom directory with the correct double backslash separator (by default, C:\\Program Files\\BMC Software\\BMCCloudLifeCycleManagement\\Cloud_UI\\custom).Tip
Do not confuse the custom directory here with the custom directory in installationDirectory\tomcat\webapps\clmui.
- If you installed the My Cloud Services console (clmui) on its own host, open the Config.properties file (by default, /opt/bmc/CloudPortalWebApplication/tomcat/webapps/clmui/WEB-INF/classes or C:\Program Files\BMC Software\CloudPortalWebApplication\tomcat\webapps\clmui\WEB-INF\classes).
Copy the contents of the installationDirectory/Cloud_UI/custom_sample directory to the installationDirectory/Cloud_UI/custom directory on the My Cloud Services Console host.
Note
If you installed clmui on Platform Manager, you might need to create the custom directory.
When you add resource or angular files for your locale, make sure that the encoding in your editor is set to Unicode (UTF-8). Otherwise, your text might be corrupted.
To localize the key/value files for custom fields in the My Cloud Services console
The following instructions apply only to the custom fields used inside the Cart Checkout page of the My Cloud Services console. For more information on custom fields, see Customizing the Cart Checkout page.
- Locate the resources-locale_en.js file used with the custom fields (by default, C:\Program Files\BMC Software\CloudPortalWebApplication\Cloud_UI\custom\i18n).
- Make two copies of the resource files in the i18n directory. You need two files – one without the country code – so that your language works on all supported browsers.
- For a complete list of two-digit language codes, see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
- For a complete list of two-digit country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.
- Rename them with the following formats:
- resources-locale_fr.js
- resources-locale_fr-fr.js
- Make two copies of the resource files in the i18n directory. You need two files – one without the country code – so that your language works on all supported browsers.
Edit the files and translate all strings in the "value": " " fields. For example:
[ { "key": "customfields.label.chargecode", "value": "Code de Charge" }, { "key": "customfields.label.decommissiondate", "value": "Date de Déclassement" }, ]
Save your changes and re-load the Cart Checkout page.
You do not need to restart Tomcat to see these changes to the Cart Checkout page, because these files are external to the clmui.war file used by the My Cloud Services console. Your changes are automatically deployed to the Tomcat web application.Note
If the localization does not work as expected, verify that the default custom directory value in the configuration uses the correct directory separator (\\) as mentioned in Before you begin.
To localize the key/value files for strings and dates in the My Cloud Services console
The following instructions apply to all areas of the UI except custom fields, Monitoring Rules, and Performance charts.
- Locate the clmui.war file.
- If you installed the My Cloud Services console on its own host, the clmui.war file is located by default at C:\Program Files\BMC Software\CloudPortalWebApplication\tomcat\webapps on the My Cloud Services console,
- If you installed the My Cloud Services console on the Platform Manager host, the clmui.war file is located by default at C:\Program Files\BMC Software\BMCCloudLifeCycleManagement\Platform_Manager\lib on the Platform Manager.
- Add localized resource files to the clmui.war (for example, with WinZip):
- Navigate to \common\i18n\scripts\ inside the clmui.war file.
- Make two copies of the resources-locale_en.js file. You need two files – one without the country code – so that your language works on all supported browsers.
- Rename them with the following formats:
- resources-locale_fr.js
- resources-locale_fr-fr.js
- Add the new resource files files to the clmui.war archive.
Edit the files and translate all the strings in the "value": " " fields (except for the four date key/value pairs documented in the next step). For example:
{ "key": "object.type.server", "value": "Serveur" }, { "key": "object.type.database", "value": "Base de Données" }, { "key": "object.type.storage", "value": "Stockage" }, { "key": "grid.columnlabel.projectname", "value": "NOM DU PROJET" },
Edit the four date key/value pairs (locale.gridDateFormat, locale.gridDateTimeFormat, locale.serverdetailsDateTimeFormat, and locale.requestsDateFormat) to correctly format the dates according to your locale, for example, French (dd/MM/yyyy).
Do not translate the string value (for example, MM/jj/aaaa). Use the correct country format suggested for your locale in Date format by country, except capitalize the month (MM instead of mm). Otherwise, date searching is broken, and the dates are wrongly displayed.{ "key": "locale.gridDateFormat", "value": "dd/MM/yyyy" }, { "key": "locale.gridDateTimeFormat", "value": "dd/MM/yyyy HH:mm" }, { "key": "locale.serverdetailsDateTimeFormat", "value": "dd/MM/yyyy 'à' HH:mm" }, { "key": "locale.requestsDateFormat", "value": "dd/MM/yyyy HH:mm" },
- Rebuild the clmui.war file after you finish all the localization steps, as described in To rebuild the WAR file and restart Tomcat.
To localize the key/value files for strings and dates in Monitoring Rules and Performance charts used in the My Cloud Services console
You localize the key/value .properties files for Monitoring Rules and Performance charts in a different location from the main My Cloud Services console because it is legacy code based upon jQuery instead of AngularJS. Add strings to the following .properties files:
- LinechartLocal_
- PolicyStrings_
- AuditStrings_
- RSFCStrings_
- RSNavtreeString_
- serviceHealth_
For each .properties file, edit or create the appropriate file for the language you are going to support. The file for your language might already exist, but the strings are in English. If the file exists, simply edit the file and change the strings to your language.
- Locate the clmui.war file.
- If you installed the My Cloud Services console on its own host, the clmui.war file is located by default at C:\Program Files\BMC Software\CloudPortalWebApplication\tomcat\webapps on the My Cloud Services console.
- If you installed the My Cloud Services console on the Platform Manager host, the clmui.war file is located by default at C:\Program Files\BMC Software\BMCCloudLifeCycleManagement\Platform_Manager\lib on the Platform Manager.
- Add localized .properties files to the clmui.war (for example, with WinZip):
- Navigate to \common\i18n\scripts\bundle.
Inside the clmui/common/i18n/scripts/bundle directory are the key/value .properties files.
- Edit the existing or create new .properties files files to the clmui.war archive.
To add French, for example, add the following files and specify the French translation for each key in the files:- AuditStrings_fr.properties
- AuditStrings_fr-fr.properties
- LinechartLocal_fr.properties
- LinechartLocal_fr-fr.properties
- PolicyStrings_fr.properties
- PolicyStrings_fr-fr.properties
- RSFCStrings_fr.properties
- RSFCStrings_fr-fr.properties
- RSNavtreeString_fr.properties
- RSNavtreeString_fr-fr.properties
- serviceHealth_fr.properties
- serviceHealth_fr-fr.properties
- Navigate to \common\i18n\scripts\bundle.
- Rebuild the clmui.war file after you finish all the localization steps, as described in To rebuild the WAR file and restart Tomcat.
To localize the key/value files for currency values and numbers
For currency values and numbers, the following key/value files that are already available and localized within the third-party AngularJS angular-i18n library:
- U.S. English
- Great Britain English
- French
- German
- Italian
- Spanish
- Danish
- Dutch
- Norwegian
- Portuguese
- Russian
- Chinese
- Japanese
- Korean
- Arabic
Only use these steps to create new currency values and number key/value files for languages not currently available.
- Locate the clmui.war file.
- If you installed the My Cloud Services console on its own host, the clmui.war file is located by default at C:\Program Files\BMC Software\CloudPortalWebApplication\tomcat\webapps on the My Cloud Services console,
- If you installed the My Cloud Services console on the Platform Manager host, the clmui.war file is located by default at C:\Program Files\BMC Software\BMCCloudLifeCycleManagement\Platform_Manager\lib on the Platform Manager,
- Add localized .properties files to the clmui.war (for example, with WinZip):
- Navigate to the clmui/thirdparty/scripts/angular-plugins/angular-i18n directory.
Inside the clmui/thirdparty/scripts/angular-plugins/angular-i18n directory are the key/value .js files. - To add support for any other language, make a copy of angular-locale_en.js and save it in the following format:
angular-locale_<language code>.js - Edit your new file and update the values for each key appropriately.
- Navigate to the clmui/thirdparty/scripts/angular-plugins/angular-i18n directory.
- Rebuild the clmui.war file after you finish all the localization steps, as described in To rebuild the WAR file and restart Tomcat.
To localize the key/value files for searching status column values in the Resource List, My Requests, and Catalog
The status values displayed in the Resource List, My Requests, and Catalog are localized by the key/value files in the following directories:
- Platform Manager host: <PM_install_directory>/lib/clmui/common/i18n/scripts/
- Tomcat host (whether installed on Platform Manager or its own the My Cloud Services console host): <Tomcat_install_directory>/webapps/clmui/common/i18n/scripts/
However, those values are searched based upon the localized key/value loc_<language code>.txt files in the following directory on the Platform Manager: <PM_install_directory>/configuration/localization
- On the Platform Manager, navigate to the <PM_install_directory>/configuration/localization directory.
For example, C:\Program Files\BMC Software\BMCCloudLifeCycleManagement\Platform_Manager\configuration\localization. Open the loc_en.txt file.
Only the U.S. English file is currently available.- Make a new copy of the loc_en.txt file and rename it appropriately, for example, loc_fr.txt file.
Edit your new file and update the values for each key appropriately.
For example:# server state, ServiceRequestState, ActivityState, CartState, AuditStatus Provisionnement => Provisionnement Installé => Arrêtée
- Restart Platform Manager after you finish all the localization steps, as described in To restart Platform Manager.
To add your list of language codes to the appropriate configuration file
If you add a locale not already supported by BMC Cloud Lifecycle Management, you must edit the configuration file to add support for indexing the data for multilanguage fields in your additional languages.
- Edit the appropriate configuration file:
- If you installed the My Cloud Services console on its own host, edit the WEB-INF/classes/Config.properties file located at C:\Program Files\BMC Software\CloudPortalWebApplication\tomcat\webapps on the My Cloud Services console,
- Locate the com.bmc.cloud.ui.supportedLanguages key.
Set the value to be a comma-separated list of two-letter language codes that specify what languages the indexing service will use to index data.
The following example includes English, French, and Chinese:com.bmc.cloud.ui.supportedLanguages=en, fr, zh
- If you installed the My Cloud Services console on the Platform Manager host, edit the <install_directory>/configuration/cloudservices.json file on Platform Manager.
- Locate the ESIndexingService section.
Set the value of the attributeValue property to be a comma-separated list of two-letter language codes that specify what languages the indexing service will use to index data.
The following example includes English, French, and Chinese:{ { "cloudClass" : "com.bmc.cloud.model.beans.CloudService", "guid" : "5856e825-0f21-4b03-99fd-0f476f3103e9", "description" : "ElasticSearch Indexing Service", "name" : "ESIndexingService", "cloudServiceDefinition" : "/cloudservicedefinition/9a0d3c22-d1c8-402c-9021-c2ee0b7c6fe1", "cloudServiceDefinitionObject" : { "cloudClass" : "com.bmc.cloud.model.beans.CloudServiceDefinition", "guid" : "9a0d3c22-d1c8-402c-9021-c2ee0b7c6fe1", "description" : "ElasticSearch Indexing Service", "name" : "ESIndexingService", "tags" : [ ] }, "accessValues" : [ { "cloudClass" : "com.bmc.cloud.model.beans.AccessAttributeValue", "guid" : "a8072718-23b3-4e38-bb9e-0d0d19971b41", "name" : "Languages", "attributeValue" : "en, fr, zh", "accessAttribute" : { "cloudClass" : "com.bmc.cloud.model.beans.AccessAttribute", "name" : "Languages", "datatype" : "String", "description" : "Comma-separated list of two-letter language codes that specify what languages the indexing service will use to index data", "isOptional" : true, "guid" : "7b4ce245-770c-4ec4-8bd0-989e47ae92bf" } } ] }
- If you installed the My Cloud Services console on its own host, edit the WEB-INF/classes/Config.properties file located at C:\Program Files\BMC Software\CloudPortalWebApplication\tomcat\webapps on the My Cloud Services console,
- Save your changes.
- Restart the Platform Manager after you finish all the localization steps, as described in To restart Platform Manager.
To rebuild the WAR file and restart Tomcat
If you modified the contents of the clmui.war file, you must rebuild it so that your changes appear in the My Cloud Services console.
- Add the new resource files files to the clmui.war archive, for example, inside WinZip.
- Save the WAR file.
- Stop the Tomcat server (BMC CSM Portal).
- Delete the tomcat\webapp\clmui directory.
- Restart the Tomcat server to rebuild the WAR file.
You must restart the Tomcat server if you:- Installed the My Cloud Services console (clmui) on its own host.
Modified the key/value files for strings and dates in the My Cloud Services console.
Modifed the key/value files for Monitoring Rules and Performance charts strings and dates.
Modified the key/value files for currency values and numbers.
Modified the config.properties file.
- Installed the My Cloud Services console (clmui) on its own host.
To restart Platform Manager
- If you modified cloudservices.json or added another loc_<language code>.txt file (regardless of whether you installed the My Cloud Services console (clmui) on its own host), restart Platform Manager.
- Delete the data directory, for example, C:\Program Files\BMC Software\BMCCloudLifeCycleManagement\Platform_Manager\data.
- Restart the Platform Manager.
- Re-index and synchronize the Platform Manager by running the syncAll command as a Cloud Administrator:
https://PM_Host:PM_Port/csm/Index/syncAll
https://vw-sjc-clmidd02.bmc.com:9443/csm/Index/syncAll
To view the localized version of the My Cloud Services console
Perform these final steps after you create new resource files, rebuild your clmui.war archive, and restart Tomcat or Platform Manager.
Tip
Testing the localized My Cloud Services console is easier with Firefox and Internet Explorer browsers than with Chrome. Using Chrome requires a few extra steps—you must close Chrome, stop all the Chrome processes in the Task Manager, and then restart Chrome. With Firefox and Internet Explorer, you simply need to change the locale setting and reload the page.
- Set the default locale in your browser to match the resource files that you just created, for example, French.
- Clear your browser cache.
- Log on to the My Cloud Services console to see your localized page, for example, French.
Related topics
Localizing the new CLM UI (in BMC Communities)
Comments
Log in or register to comment.