Sorting ion-items alphabetically with different languages

Hi there, I am creating an app where a user sees a list that needs to be sorted alphabetically. The app is offered in two languages, so the translate pipe needs to be integrated into it in some way.

This is my current code:

  <ion-item *ngFor="let f of foods">
    <p>{{ | translate }}</p>

Is there any way I can sort them alphabetically (using in both languages using a pipe or something similar?

Let me know if I need to clarify anything.

Thank you.

I ended up doing it like this, with no pipe:

  translateFood(name) : string {
      value => {
        this.translated_food = value;

    return this.translated_food;

  ionViewDidEnter() {    
    // alphabetical sort
    this.foodStore.foods =, b) =>

I wonder if this will help. This tutorial shows you how to sort list items:

another sort example:

1 Like