Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: locales support #156

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sascha245
Copy link

@sascha245 sascha245 commented Jun 16, 2019

PR Checklist

  • Fix linting errors
  • Label has been added

Change information

  • Add translated locales from element-ui repository
  • Add basic locales service
  • Replace hard coded text by locales in src/date-picker
  • Replace hard coded text by locales in src/pagination

Note: Not all components have been translated yet.

Usage

// Import locales services
import { ElLocalesService } from 'element-angular';

// Import needed locales
import localesEn from 'element-angular/release/locales/lang/en';

// Inject service
constructor(
  private elLocales: ElLocalesService
) {
}

You can then change used locales with

this.elLocales.use(localesEn);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant