-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b35bc31
commit 31d69af
Showing
41 changed files
with
8,717 additions
and
2,519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# IntegrationI18n | ||
|
||
This project demonstrates how to use Angular i18n and Kendo UI for Angular components in an Angular application. For more information, refer to the [Translation of Messages](https://www.telerik.com/kendo-angular-ui/components/globalization/localization/messages) and [Angular Internationalization](https://angular.dev/guide/i18n) articles. | ||
|
||
## Development server | ||
|
||
To run the different i18n configurations, you can use the following commands: | ||
|
||
```bash | ||
ng serve --configuration=es | ||
``` | ||
|
||
```bash | ||
ng serve --configuration=de | ||
``` | ||
|
||
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"integration-i18n": { | ||
"projectType": "application", | ||
"schematics": {}, | ||
"root": "", | ||
"sourceRoot": "src", | ||
"prefix": "app", | ||
"i18n": { | ||
"sourceLocale": "en-US", | ||
"locales": { | ||
"es": { | ||
"translation": "src/locale/messages.es.xlf", | ||
"baseHref": "" | ||
}, | ||
"de": { | ||
"translation": "src/locale/messages.de.xlf", | ||
"baseHref": "" | ||
} | ||
} | ||
}, | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:application", | ||
"options": { | ||
"outputPath": "dist/integration-i18n", | ||
"index": "src/index.html", | ||
"browser": "src/main.ts", | ||
"polyfills": [ | ||
"zone.js", | ||
"@angular/localize/init" | ||
], | ||
"tsConfig": "tsconfig.app.json", | ||
"assets": [ | ||
{ | ||
"glob": "**/*", | ||
"input": "public" | ||
} | ||
], | ||
"styles": [ | ||
{ | ||
"input": "node_modules/@progress/kendo-theme-default/dist/all.css" | ||
}, | ||
"src/styles.css" | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
"maximumWarning": "500kB", | ||
"maximumError": "1MB" | ||
}, | ||
{ | ||
"type": "anyComponentStyle", | ||
"maximumWarning": "4kB", | ||
"maximumError": "8kB" | ||
} | ||
], | ||
"outputHashing": "all" | ||
}, | ||
"development": { | ||
"optimization": false, | ||
"extractLicenses": false, | ||
"sourceMap": true | ||
}, | ||
"es": { | ||
"localize": ["es"] | ||
}, | ||
"de": { | ||
"localize": ["de"] | ||
} | ||
}, | ||
"defaultConfiguration": "production" | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"configurations": { | ||
"production": { | ||
"buildTarget": "integration-i18n:build:production" | ||
}, | ||
"development": { | ||
"buildTarget": "integration-i18n:build:development" | ||
}, | ||
"es": { | ||
"buildTarget": "integration-i18n:build:es" | ||
}, | ||
"de": { | ||
"buildTarget": "integration-i18n:build:de" | ||
} | ||
}, | ||
"defaultConfiguration": "development" | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n" | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"polyfills": [ | ||
"zone.js", | ||
"zone.js/testing", | ||
"@angular/localize/init" | ||
], | ||
"tsConfig": "tsconfig.spec.json", | ||
"assets": [ | ||
{ | ||
"glob": "**/*", | ||
"input": "public" | ||
} | ||
], | ||
"styles": [ | ||
{ | ||
"input": "node_modules/@progress/kendo-theme-default/dist/all.css" | ||
}, | ||
"src/styles.css" | ||
], | ||
"scripts": [] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"analytics": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"name": "integration-i18n", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"watch": "ng build --watch --configuration development", | ||
"test": "ng test" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/animations": "^19.0.0", | ||
"@angular/common": "^19.0.0", | ||
"@angular/compiler": "^19.0.0", | ||
"@angular/core": "^19.0.0", | ||
"@angular/forms": "^19.0.0", | ||
"@angular/localize": "^19.0.0", | ||
"@angular/platform-browser": "^19.0.0", | ||
"@angular/platform-browser-dynamic": "^19.0.0", | ||
"@angular/router": "^19.0.0", | ||
"@progress/kendo-angular-buttons": "17.2.0", | ||
"@progress/kendo-angular-common": "17.2.0", | ||
"@progress/kendo-angular-dateinputs": "17.2.0", | ||
"@progress/kendo-angular-dialog": "17.2.0", | ||
"@progress/kendo-angular-dropdowns": "17.2.0", | ||
"@progress/kendo-angular-excel-export": "17.2.0", | ||
"@progress/kendo-angular-grid": "^17.2.0", | ||
"@progress/kendo-angular-icons": "17.2.0", | ||
"@progress/kendo-angular-inputs": "17.2.0", | ||
"@progress/kendo-angular-intl": "17.2.0", | ||
"@progress/kendo-angular-l10n": "17.2.0", | ||
"@progress/kendo-angular-label": "17.2.0", | ||
"@progress/kendo-angular-layout": "17.2.0", | ||
"@progress/kendo-angular-messages": "^1.59.0", | ||
"@progress/kendo-angular-navigation": "17.2.0", | ||
"@progress/kendo-angular-pager": "17.2.0", | ||
"@progress/kendo-angular-pdf-export": "17.2.0", | ||
"@progress/kendo-angular-popup": "17.2.0", | ||
"@progress/kendo-angular-progressbar": "17.2.0", | ||
"@progress/kendo-angular-toolbar": "17.2.0", | ||
"@progress/kendo-angular-treeview": "17.2.0", | ||
"@progress/kendo-angular-utils": "17.2.0", | ||
"@progress/kendo-data-query": "^1.0.0", | ||
"@progress/kendo-drawing": "^1.21.0", | ||
"@progress/kendo-licensing": "^1.0.2", | ||
"@progress/kendo-svg-icons": "^4.0.0", | ||
"@progress/kendo-theme-default": "^10.0.1", | ||
"rxjs": "~7.8.0", | ||
"tslib": "^2.3.0", | ||
"zone.js": "~0.15.0" | ||
}, | ||
"devDependencies": { | ||
"@angular-devkit/build-angular": "^19.0.6", | ||
"@angular/cli": "^19.0.6", | ||
"@angular/compiler-cli": "^19.0.0", | ||
"@types/jasmine": "~5.1.0", | ||
"jasmine-core": "~5.4.0", | ||
"karma": "~6.4.0", | ||
"karma-chrome-launcher": "~3.2.0", | ||
"karma-coverage": "~2.2.0", | ||
"karma-jasmine": "~5.1.0", | ||
"karma-jasmine-html-reporter": "~2.1.0", | ||
"typescript": "~5.6.2" | ||
} | ||
} |
Binary file not shown.
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
examples-standalone/integration-i18n/src/app/app.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<h1 i18n="User welcome|An introduction header for this sample">Hello, World!</h1> | ||
|
||
<kendo-grid></kendo-grid> | ||
<kendo-grid | ||
[kendoGridBinding]="gridData" | ||
[pageSize]="10" | ||
[pageable]="true" | ||
[sortable]="true" | ||
[filterable]="true" | ||
[groupable]="true" | ||
[height]="355" | ||
> | ||
<kendo-grid-column field="CompanyName" [width]="140"></kendo-grid-column> | ||
<kendo-grid-column field="ContactName" [width]="120"></kendo-grid-column> | ||
<kendo-grid-column field="City" [width]="100"></kendo-grid-column> | ||
<kendo-grid-column field="ContactTitle" [width]="130"></kendo-grid-column> | ||
</kendo-grid> |
54 changes: 54 additions & 0 deletions
54
examples-standalone/integration-i18n/src/app/app.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Component } from '@angular/core'; | ||
import { KENDO_GRID } from "@progress/kendo-angular-grid"; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
imports: [KENDO_GRID], | ||
templateUrl: './app.component.html', | ||
styleUrl: './app.component.css' | ||
}) | ||
export class AppComponent { | ||
public gridData: Customer[] = [ | ||
{ | ||
Id: "ALFKI", | ||
CompanyName: "Alfreds Futterkiste", | ||
ContactName: "Maria Anders", | ||
ContactTitle: "Sales Representative", | ||
City: "Berlin", | ||
}, | ||
{ | ||
Id: "ANATR", | ||
CompanyName: "Ana Trujillo Emparedados y helados", | ||
ContactName: "Ana Trujillo", | ||
ContactTitle: "Owner", | ||
City: "México D.F.", | ||
}, | ||
{ | ||
Id: "ANTON", | ||
CompanyName: "Antonio Moreno Taquería", | ||
ContactName: "Antonio Moreno", | ||
ContactTitle: "Owner", | ||
City: "México D.F.", | ||
}, | ||
{ | ||
Id: "AROUT", | ||
CompanyName: "Around the Horn", | ||
ContactName: "Thomas Hardy", | ||
ContactTitle: "Sales Representative", | ||
City: "London", | ||
}, | ||
{ | ||
Id: "BERGS", | ||
CompanyName: "Berglunds snabbköp", | ||
ContactName: "Christina Berglund", | ||
ContactTitle: "Order Administrator", | ||
City: "Luleå", | ||
}]; | ||
} | ||
export interface Customer { | ||
Id: string; | ||
CompanyName: string; | ||
ContactName: string; | ||
ContactTitle: string; | ||
City: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; | ||
import { provideRouter } from '@angular/router'; | ||
import { provideAnimations } from '@angular/platform-browser/animations'; | ||
|
||
import { routes } from './app.routes'; | ||
|
||
export const appConfig: ApplicationConfig = { | ||
providers: [provideZoneChangeDetection({ eventCoalescing: true }),provideAnimations(), provideRouter(routes)] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Routes } from '@angular/router'; | ||
|
||
export const routes: Routes = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.