Closed arcovoltaico closed 6 years ago
This might be angular specific issue, because this works for me
<Button text="{{' ' + L('sign_in_with_fb') }}" class="btn btn-primary font-awesome"/>
Yes it's angular related. Meanwhile I found this workaround:
Component: //the &fa code is not working, had to use the copy-pasted icon: this.shareIt = " " + localize("requested.shareIt");
View: <Button class="fa" [text]="shareIt" (tap)="share()">
Surrounded with parenthesis: [text]="'' + ('login.fblogin' | L)" class="fa fb-button"
?
Sorry, it's not working , just renders this : login.fblogin
<Label [text]="this_is_it + ('hello.world' | L)"></Label>
works for me where this_is_it
is just a string, hello.world is correctly translated. Is login.fblogin
a key in your i18n file ? you may want to double check that.
I'm closing this issue as this is not something I can fix with this plugin
It is , and translated fine from localize or alone in the view. The problem cames using two pipes and the parenthesis can avoid the need of using both :-(
El 16 mar 2018, a las 20:01, Ludovic Fabrèges notifications@github.com escribió:
<Label [text]="this_is_it + ('hello.world' | L)"> works for me where this_is_it is just a string, hello.world is correctly translated. Is login.fblogin a key in your i18n file ? you may want to double check that.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I understand anyway the workaround would be helpful for others ;-)
El 16 mar 2018, a las 20:07, Ludovic Fabrèges notifications@github.com escribió:
I'm closing this issue as this is not something I can fix with this plugin
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi, I'm trying to translate the text of a button that is prefixed by a fa-icon.
[text]="'' + ' login.fblogin' | L " class="fa fb-button"
My json: "fblogin": "Login with Facebook", // not working
" fblogin": " Login with Facebook", // detected but the fa-icon code is displayed as text as fa CSS seems to be executed before the i18n localize
And pasting the rendered icon: " fblogin": " Login with Facebook" // not working
Any idea?
Thanks a lot