How to apply Localization on HTML5 Viewers | Scene 7 Dynamic Media Classic
Description description
Environment
Adobe Scene 7
Apply Localization
Below are steps on how to apply localization on Adobe Scene 7 HTML5 Viewers.
Resolution resolution
Every textual content in the viewer that can be localized is represented by a special HTML5 Viewer SDK identifier called SYMBOL
.
Any SYMBOL
has a default associated text value for the English locale (“en”) supplied with the out-of-the-box viewer. It also may have user-defined values set for as many locales as needed.
User-defined localization data can be passed to the viewer as a localization JSON object.
Such an object contains the list of supported locales, SYMBOL
text values for each locale, and the default locale.
Here is an example of such a localization object :
style type="text/css"
#s7flyout_div.s7flyoutviewer{
width:50%;
height:auto;
}
/style
script type="text/javascript" language="javascript" src="<u style="text-decoration:underline">https://s7d9.scene7.com/s7viewers/html5/js/FlyoutViewer.js</u>"/script
div id="s7flyout_div"/div
script type="text/javascript"
var s7flyout_div = new s7viewers.FlyoutViewer();
s7flyout_div.setContainerId("s7flyout_div");
s7flyout_div.setParam("serverurl", "<u style="text-decoration:underline">http://s7d1.scene7.com/is/image/</u>");
s7flyout_div.setParam("contentRoot", "<u style="text-decoration:underline">http://s7d1.scene7.com/is/content/</u>");
s7flyout_div.setAsset("Scene7SharedAssets/Backpack_B");
<b>s7flyout_div.setLocalizedTexts({"en":{"FlyoutZoomView.TIP_BUBBLE_OVER":"Mouse over to zoom"},"fr":{"FlyoutZoomView.TIP_BUBBLE_OVER":"Passez la souris sur pour zoomer"},defaultLocale:"fr"})
s7flyout_div.init();
/script
Choose defaultLocale:"fr"
will load French data on HTML5 Viewer (after the viewer loads).
Additional Information
Additional documentation about creating Localization Text (In different languages) on HTML5 Viewers: https://marketing.adobe.com/resources/help/en_US/s7/viewers_ref/c_html5_flyout_viewer_20_localization.html