microsoft / microsoft/TypeChat

How to handle multiple languages?

Open
#132 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
8.7k
Forks
414
Avg merge
3h 8m
Merged PRs (30d)
3

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the restaurant example and its Pizza schema, then inspect how the schema's string values and comments are used to construct response JSON. Determine what multilingual behavior should be supported and what a completed locale strategy would require; the issue does not name implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
internationalization, localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.