how-to use ngx-formly with ngx-translate
See original GitHub issue[x ] support request
just a question:
Is there a way to use ngx-translate with formly? Any samples available?
Formly seems to be awesome but we can not find any working example for translation or the usage of pipes
something like
....
{
key: 'readyTime',
type: 'select',
templateOptions: {
description: '"from" | translate' ,
required: true,
options: fromTime
},
...
},
...
did not work (translate not defined)
Thanks for a hint!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:23 (14 by maintainers)
Top Results From Across the Web
Ngx Formly Ngx Translate - StackBlitz
Editor Preview Both. Sign in. Project. Search. Settings. Switch to Light Theme. Enter Zen Mode. Project. Download Project. Info. Ngx Formly Ngx Translate....
Read more >Use Angular Formly Extensions to automatically localize all ...
[0:28] One way to translate is, for instance, to use NGX-Translate. I've actually already installed that to have to set up in place....
Read more >[ngx-formly] Use Angular Formly Extensions to automatically ...
In this lesson we're diving a bit deeper and learn how to inject services into Formly Extensions with the example of using ngx-translate...
Read more >How to use the @ngx-formly/core.FormlyModule.forRoot ...
import { TranslateService } from '@ngx-translate/core'; import { registerTranslateExtension } from './translate.extension'; // AoT requires an exported function ...
Read more >i18n ngx-translate (alternative approach) - Formly
Formly · Examples · Advanced · i18n ngx-translate (alternative approach) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can use one of the following methods:
expressionProperties
https://stackblitz.com/edit/ngx-formly-translate-1for the first method it may introduce some performance issues for a large form which I’m thinking to solve it by allowing observable in
expressionProperties
, in the future you can use something like:@johannesjo that requires adding
ngx-translate
as a dependency 😦, I see another approach that would make the integration much easy (using a custom extension), I’ll provide an example when time allows!