<commit_before># angular-dashboard-framework

[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg)](https://github.com/angular-dashboard-framework/angular-dashboard-framework/blob/master/LICENSE.md) [![Build Status](https://travis-ci.org/angular-dashboard-framework/angular-dashboard-framework.svg?branch=master)](https://travis-ci.org/angular-dashboard-framework/angular-dashboard-framework) [![Coverage Status](https://coveralls.io/repos/angular-dashboard-framework/angular-dashboard-framework/badge.svg?branch=master&service=github)](https://coveralls.io/github/angular-dashboard-framework/angular-dashboard-framework?branch=master) [![Dependency Status](https://www.versioneye.com/user/projects/562008b836d0ab001900070b/badge.svg?style=flat)](https://www.versioneye.com/user/projects/562008b836d0ab001900070b) [![Join the chat at https://gitter.im/sdorra/angular-dashboard-framework](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-dashboard-framework/angular-dashboard-framework?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

> Dashboard framework with Angular.js and Twitter Bootstrap.

The api of angular-dashboard-framework (adf) is documented [here](http://angular-dashboard-framework.github.io/angular-dashboard-framework/docs/). A getting
started guide can be found [here](https://github.com/angular-dashboard-framework/angular-dashboard-framework/wiki/Getting-started).
Follow me ([@ssdorra](https://twitter.com/ssdorra)) on twitter for latest updates and news about adf.

## Demo

A live demo of the adf can be viewed [here](http://angular-dashboard-framework.github.io/angular-dashboard-framework/). The demo uses html5 localStorage to store the state of the dashboard. The source of the demo can be found [here](https://github.com/angular-dashboard-framework/angular-dashboard-framework/tree/master/sample).

A more dynamic example can be found [here](https://github.com/angular-dashboard-framework/adf-dynamic-example).

## Build from source

Install bower and gulp:

```bash
npm install -g bower
npm install -g gulp
```

Clone the repository:

```bash
git clone https://github.com/angular-dashboard-framework/angular-dashboard-framework
cd angular-dashboard-framework
```

Install dependencies:

```bash
npm install
bower install
```

Checkout git submodule widgets:

```bash
git submodule init
git submodule update
```

You can start the sample dashboard, by using the serve gulp task:

```bash
gulp serve
```

Now you open the sample in your browser at http://localhost:9001/sample

Or you can create a release build of angular-dashboard-framework and the samples:

```bash
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
{
}
```

<commit_msg>Updated readme with multi-language information<commit_after># angular-dashboard-framework

[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg)](https://github.com/angular-dashboard-framework/angular-dashboard-framework/blob/master/LICENSE.md) [![Build Status](https://travis-ci.org/angular-dashboard-framework/angular-dashboard-framework.svg?branch=master)](https://travis-ci.org/angular-dashboard-framework/angular-dashboard-framework) [![Coverage Status](https://coveralls.io/repos/angular-dashboard-framework/angular-dashboard-framework/badge.svg?branch=master&service=github)](https://coveralls.io/github/angular-dashboard-framework/angular-dashboard-framework?branch=master) [![Dependency Status](https://www.versioneye.com/user/projects/562008b836d0ab001900070b/badge.svg?style=flat)](https://www.versioneye.com/user/projects/562008b836d0ab001900070b) [![Join the chat at https://gitter.im/sdorra/angular-dashboard-framework](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-dashboard-framework/angular-dashboard-framework?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

> Dashboard framework with Angular.js and Twitter Bootstrap.

The api of angular-dashboard-framework (adf) is documented [here](http://angular-dashboard-framework.github.io/angular-dashboard-framework/docs/). A getting
started guide can be found [here](https://github.com/angular-dashboard-framework/angular-dashboard-framework/wiki/Getting-started).
Follow me ([@ssdorra](https://twitter.com/ssdorra)) on twitter for latest updates and news about adf.

## Demo

A live demo of the adf can be viewed [here](http://angular-dashboard-framework.github.io/angular-dashboard-framework/). The demo uses html5 localStorage to store the state of the dashboard. The source of the demo can be found [here](https://github.com/angular-dashboard-framework/angular-dashboard-framework/tree/master/sample).

A more dynamic example can be found [here](https://github.com/angular-dashboard-framework/adf-dynamic-example).

## Build from source

Install bower and gulp:

```bash
npm install -g bower
npm install -g gulp
```

Clone the repository:

```bash
git clone https://github.com/angular-dashboard-framework/angular-dashboard-framework
cd angular-dashboard-framework
```

Install dependencies:

```bash
npm install
bower install
```

Checkout git submodule widgets:

```bash
git submodule init
git submodule update
```

You can start the sample dashboard, by using the serve gulp task:

```bash
gulp serve
```

Now you open the sample in your browser at http://localhost:9001/sample

Or you can create a release build of angular-dashboard-framework and the samples:

```bash
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'
}
```


{'fraction_non_alphanumeric': 0.13032769329620905, 'fraction_numerical': 0.009638038123795245, 'mean_word_length': 4.35493119266055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 32, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2690609', 'n_tokens_mistral': 2952, 'n_tokens_neox': 2855, 'n_words': 633}