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

How use the i18n in this component? #598

Open
sobrito opened this issue Jun 12, 2018 · 1 comment
Open

How use the i18n in this component? #598

sobrito opened this issue Jun 12, 2018 · 1 comment

Comments

@sobrito
Copy link

sobrito commented Jun 12, 2018

I am using the ngx-translate/core, how is possível translate the header and the placeholder?

@Pingolus
Copy link

Inside component or service :

this.translate.instant(key);

(translate is an instance of TranslateService from @ngx-translate/core)

Just call this method when cols are declared ; for titles and placeholders.

To translate pagination inside component html :

    <pagination *ngIf="config.paging"
                firstText="{{ 'yourTranslateKey' | translate }}"
                nextText="{{ 'yourTranslateKey' | translate }}"
                previousText="{{ 'yourTranslateKey' | translate }}"
                lastText="{{ 'yourTranslateKey' | translate }}"
                ...>
    </pagination>

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

No branches or pull requests

2 participants