Ewa.Workbook.getUiCultureName()
Applies to: apps for SharePoint | SharePoint Server 2010
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
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.
<script type="text/javascript">
var ewa = null;
// Add event handler for onload event.
if (window.attachEvent)
{
window.attachEvent("onload", ewaOmPageLoad);
}
else
{
window.addEventListener("DOMContentLoaded", ewaOmPageLoad, false);
}
// Add event handler for applicationReady event.
function ewaOmPageLoad()
{
Ewa.EwaControl.add_applicationReady(getEwa);
}
function getEwa()
{
// 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>