Office365 SP2013 SP2016
Alerts: 2.5.1.14
Calendar: 2.5.1.15
Links: 2.4.1.12
News: 1.5.2.11
Slider: 2.7.1.15
Tiles: 3.5.1.14
BindTuning web parts include support for localization and although after installation you can only see 2 languages (EN and PT), this support can be extended to any language.
To add support for other languages to the web parts, please proceed as follows:
- Open the site where you have your web part installed using SharePoint Designer
- Go to
All Files > Style Library > BT WebParts Add-ins > web part name > language
- Check out and edit the file languages.js
- Append to the existent structure the country code and the name of the language (in this example we are adding Spanish to the list)
e.g. window.BT.v2sliderWP.lang.files = { "en-us": "English (US)", "pt-pt": "Português (PT)", "es-es": "Spanish (ES)" };
- Save the file, check-in and publish the major version. The new language option will appear in the web part settings under the Advanced Options group
- Copy the original file en-us.js and rename it to the country code added in the languages.js
e.g. es-es.js
- Check-out and edit the renamed file
- For performance reasons, the file is compressed. Copy all the content to the file and use this (or another) web application to uncompress the file
- Paste the uncompressed code in the file
- This file contains a JSON object with all the strings used by the web part. Start by changing the property lang from en-us to the new language
e.g. window.BT.v2sliderWP.lang["es-es"]
- Once you translate all the strings to your new language use this (or another) web application to compress your file.
- Check-in and publish the major version
- Edit your web part settings and select the desired language to be displayed
- The web part is translated to the new language!
Troubleshooting
Non-translated strings
When a new web part version is published, new text and labels may be added, which are not yet translated in your translation file.
You will identify non-translated strings in the format ##TEXT##
.
The following example shows a non-translated string in the web part settings title, in the format ##[WEBPART_NEW_ITEM][SLIDE_SETTINGS_HEADING]##
The WEBPART_NEW_ITEM
represents the object where the string is missing and the SLIDE_SETTINGS_HEADING
represents the missing property.
To add the missing string to the web part, please proceed as follows:
- Open the site using SharePoint Designer
- Go to
All Files > Style Library > BT WebParts Add-ins > web part name > language
- Check-out and edit the .js file with the country code you are using
- For performance reasons the file is compressed. Copy all the content to the file and use this (or another) web application to uncompress the file.
- In the .js file, locate the non-translated object, by searching for its object name. In this example it would be
WEBPART_NEW_ITEM
- Add the new property and its translation
e.g. webpart_new_item: { ... modal_heading: "Crear nueva diapositiva", edit_heading: "Editar diapositiva" slide_settings_heading: "Configuración de diapositivas" }
- Once you translate all the non-translated strings, use this (or another) web application to compress your file.
- Check-in and publish the major version
Comments