-
Notifications
You must be signed in to change notification settings - Fork 4
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
Internationalisation for components #8
Comments
@MichaelLangbein and @voinSR maybe you can add some comments to this Issue. |
Hi! |
Hey guys! I did some comparison between i18n and ngx-translate. I've got two important requirements:
Please find a demo ... It seems that angular is going for i18n... but things are evolving slowly, and there is very little documentation when it comes to live-reloading. @boeckMt , @voinSR : What are your internationalization needs? I'll do some more research on live-reloading using i18n, but at the moment I'm a little worried that it does not yet support all the features we'd need... |
@MichaelLangbein I created a more extensive demo for angular i18n. Maybe we should let the decision to the developer which method to use (I also don't like to include i18n in the libraries for only a few translations) and do something like the Examples abov, so e.g. a config which we can pass to the module or component. We also can further check what other angular component libraries are doing https://angular.io/resources?category=development#ui-components |
Another idea would be to use content projection like we have done in layerentry to pas a different title. <div #ref>
<ng-content></ng-content>
</div>
<span *ngIf="ref.children.length == 0">
default text
</span> But this is not working for nested components. |
Clarity Core now uses a global service or component inputs |
Description
Right now there is no possibility to translate some of the used strings for titles and default values in our components e.g.:
in @dlr-eoc/layer-control - 'Opacity', 'Layer Setting', 'Layer Legend', 'Layer Info'...
We need a general way how to translate the components we provide in your library so it is possible to create applications with multiple languages.
Relevant Package
Examples
Clarity Design uses something like a 'CommonStringsService' (so bindings to all labels and text)
Clarity Design Core
vmware-archive/clarity#4502 -> https://clarity.design/storybook/core/?path=/story/foundation-internationalization--page
Angular Material uses something like a 'class instance' extension
ng-bootstrap uses angular i18n
ag-grid
Angular Ant Design
Carbon Components Angular
Angular DevExtreme
Angular Fancy grid
Ignite UI for Angular
Angular Kendo
Angular Nebular
ng-lightning
Angular PrimeNG
Angular TrulyUI
Angular vaadin
Angular wijmo
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: