Skip to content

Commit

Permalink
Removed information about multi-language support from readme.
Browse files Browse the repository at this point in the history
Should create a wiki page for this instead.
  • Loading branch information
chaaya committed May 27, 2016
1 parent 598d66b commit 8bec896
Showing 1 changed file with 0 additions and 79 deletions.
79 changes: 0 additions & 79 deletions README.md
Expand Up @@ -59,85 +59,6 @@ gulp all
```
The sample and the final build of angular-dashboard-framework are now in the dist directory.

## Multi-language support
These languages are supported out of the box in angular-dashboard-framework.

| Language | ISO Code | Default |
| ------------- |------------- | -----|
| English | en-GB | Yes |
| Swedish | sv-SE | No |

You can change the culture via the dashboardProvider in the config phase
```javascript
angular
.module('adfWidgetSample', ['adf'])
.config(function(dashboardProvider){
dashboardProvider.setCulture('sv-SE');
}
```
... or in your controller like this.
```javascript
angular
.module('adfWidgetSample')
.controller('SampleController', SampleController);

SampleController.$inject = [
'$rootScope',
'dashboard'
];
/* @ngInject */
function DashboardController($rootScope, dashboard) {
$rootScope.$on('languageChange', function(cultureCode)) {
dashboard.setCulture(cultureCode);
});
}
```
### Add non existent language
Need support for another language? No problems! You can also add your own culture to the framework.
```javascript
angular
.module('adfWidgetSample', ['adf'])
.config(function(dashboardProvider){
dashboardProvider.addCulture('de-DE',
{
ADF_COMMON_CLOSE: 'Schließen',
ADF_COMMON_DELETE: 'Löschen'
...
}
);
}
```
#### Translation table
```javascript
{
ADF_COMMON_CLOSE: 'Close',
ADF_COMMON_DELETE: 'Delete',
ADF_COMMON_TITLE: 'Title',
ADF_COMMON_CANCEL: 'Cancel',
ADF_COMMON_APPLY: 'Apply',
ADF_COMMON_EDIT_DASHBOARD: 'Edit dashboard',
ADF_EDIT_DASHBOARD_STRUCTURE_LABEL: 'Structure',
ADF_DASHBOARD_TITLE_TOOLTIP_ADD: 'Add new widget',
ADF_DASHBOARD_TITLE_TOOLTIP_SAVE: 'Save changes',
ADF_DASHBOARD_TITLE_TOOLTIP_EDIT_MODE: 'Enable edit mode',
ADF_DASHBOARD_TITLE_TOOLTIP_UNDO: 'Undo changes',
ADF_WIDGET_ADD_HEADER: 'Add new widget',
ADF_WIDGET_DELETE_CONFIRM_MESSAGE: 'Are you sure you want to delete this widget ?',
ADF_WIDGET_TOOLTIP_REFRESH: 'Reload Widget Content',
ADF_WIDGET_TOOLTIP_MOVE: 'Change widget location',
ADF_WIDGET_TOOLTIP_COLLAPSE: 'Collapse widget',
ADF_WIDGET_TOOLTIP_EXPAND: 'Expand widget',
ADF_WIDGET_TOOLTIP_EDIT: 'Edit widget configuration',
ADF_WIDGET_TOOLTIP_FULLSCREEN: 'Fullscreen widget',
ADF_WIDGET_TOOLTIP_REMOVE: 'Remove widget'
}
```

## Contributing

Expand Down

0 comments on commit 8bec896

Please sign in to comment.