-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.js
28 lines (23 loc) · 846 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var gui = require( '../../' ) // stand alone: replace with: require( 'easy-web-app' )
var log = require( 'npmlog' )
// Initialize the framework and the default page
var page = gui.init()
page.header.logoText = 'Internationalization Demo'
// add a EN as default language
gui.addLang( 'EN' )
// add DE and some translations
gui.addLang( 'DE',
{
'Test Language Support':'Test für Sprachunterstützung'
,'Internationalization Demo':'Sprach Demo'
}
)
// adding translation for a label can be done also separately
gui.addTranslation( 'DE',
'powered by <a href="https://github.com/ma-ha/rest-web-ui">ReST-Web-GUI</a>',
'läuft mit <a href="https://github.com/ma-ha/rest-web-ui">ReST-Web-GUI</a>'
)
// create aIO view on page
gui.addView(
{ 'id':'tst', 'title':'Test Language Support'}
)