Initialize i18next library and load messages.

pull/763/head
Fredrik Jönsson 2015-02-05 18:21:48 +01:00
parent 5e2522491d
commit 8f64e0c454
4 changed files with 15 additions and 1 deletions

View File

@ -34,6 +34,5 @@
<script type="text/javascript" src="resources/js/admin.js"></script>
</c:if>
<script type="text/javascript" src="resources/js/lib/retina.js"></script>
<script type="text/javascript" src="resources/js/lib/i18next-1.7.7.js"></script>
</body>
</html>

View File

@ -34,7 +34,12 @@
<!-- Load jQuery up here so that we can use in-page functions -->
<script type="text/javascript" src="resources/js/lib/jquery.js"></script>
<script type="text/javascript" src="resources/js/lib/i18next-1.7.7.js"></script>
<script type="text/javascript">
$.i18n.init({
lng: "${pageContext.response.locale}",
resGetPath: 'resources/js/locale/__lng__/messages.json'
});
// safely set the title of the application
function setPageTitle(title) {
document.title = "${config.topbarTitle} - " + title;

View File

@ -0,0 +1,5 @@
{
"client": {
"newClient": "New Client"
}
}

View File

@ -0,0 +1,5 @@
{
"client": {
"newClient": "New Client"
}
}