Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Angular i18next string interpolation

I would like to translate my code with i18next for my angular project.

I've installed: i18next, i18next-xhr-backend, i18next-browser-languagedetector

Using lot of ngfor into my code --> I don't know how to use i18next into string interpolations.

In this example below, i would like to translate item.label.

  <ng-container *ngFor="let item of listOfItems; let i = index">
    <mat-grid-tile rowspan="1" class="{{ item.visible === 'false' ? 'invisible' : '' }}">
      <button *ngIf="item && !isItemSelected(item)" (click)="selectItem(item)" mat-raised-button
        class="action-button {{ item.color }}">
        <span class="action-button-text">{{ item.label }}</span>
      </button>
    </mat-grid-tile>
  </ng-container>```

Here is my list of label :

[{
        "id": "1",
        "label": "flower",
        "subject": "plant", 
        "visible": "true",
        "color": "yellow"
    },
    {
        "id": "2",
        "label": "bread",
        "subject": "table", 
        "visible": "false",
        "color": "white"
    },
     {
        "id": "3",
        "label": "glass",
        "subject": "table", 
        "visible": "true",
        "color": "green"
    },
 {
        "id": "4",
        "label": "pissenlit",
        "subject": "plant", 
        "visible": "true",
        "color": "yellow_green"
    }]

here is my list of translation english and french : en:

{"flower":"flower",
"bread":"bread",
"glass":"glass"
"pissenlit":"pissenlit"
}

FR

{"flower":"fleur",
"bread":"pain",
"glass":"verre"
"pissenlit":"pissenlit"
}```


about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!