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 to handle multiple languages? #132

Open
rmtuckerphx opened this issue Oct 18, 2023 · 0 comments
Open

How to handle multiple languages? #132

rmtuckerphx opened this issue Oct 18, 2023 · 0 comments

Comments

@rmtuckerphx
Copy link

From the restaurant example, we find this type in the schema:

export type Pizza = {
    itemType: "pizza";
    // default: large
    size?: "small" | "medium" | "large" | "extra large";
    // toppings requested (examples: pepperoni, arugula)
    addedToppings?: string[];
    // toppings requested to be removed (examples: fresh garlic, anchovies)
    removedToppings?: string[];
    // default: 1
    quantity?: number;
    // used if the requester references a pizza by name
    name?: "Hawaiian" | "Yeti" | "Pig In a Forest" | "Cherry Bomb";
};

It appears that values in strings and comments (in English) are used to help construct the response JSON.

Would there need to be one schema file per language where all strings and comments are in a given language?

  • foodOrderViewShema.en-US.ts
  • foodOrderViewShema.en-GB.ts
  • foodOrderViewShema.pt-BR.ts
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

1 participant