Ewa.Workbook.getUiCultureName()
Applies to: apps for SharePoint | Excel Services | SharePoint Server 2013
In this article
Return Value
Remarks
Example
Applies To
Gets the actual name of the user interface (UI) culture for that particular session.
var value = Ewa.Workbook.getUiCultureName();
Return Value
Type: String
Remarks
The Ewa.Workbook.getUiCultureName method returns the culture of the UI for the session as a string.
Example
The following code example shows how to display the UI culture name for the session in the browser status bar after the page loads. The code example assumes that you are working with an Excel Web Access Web Part on SharePoint Server 2013.
<script type="text/javascript">
var ewa = null;
// Add event handler for onload event.
if (window.attachEvent)
{
window.attachEvent("onload", ewaOnPageLoad);
}
else
{
window.addEventListener("DOMContentLoaded", ewaOnPageLoad, false);
}
// Add event handler for applicationReady event.
function ewaOnPageLoad()
{
Ewa.EwaControl.add_applicationReady(onApplicationReady);
}
function onApplicationReady()
{
// Get a reference to the Excel Services Web Part.
ewa = Ewa.EwaControl.getInstances().getItem(0);
// Display session UI culture in browser status bar.
window.status = "The session UI culture is " + ewa.getActiveWorkbook().getUiCultureName() + ".";
}
</script>