Skip to content

Lang::CHINESE being used for only Simplified Chinese #717

Closed

Description

@Pi-Cla

I noticed that in one of the PRs (#477) a translation was added for only Simplified Chinese.
(The word for "figures" in Traditional would be:「圖」)

So I guess I have two questions:

  1. How to add the Traditional translation
  2. How should Typst users indicate whether they want to use Simplified or Traditional?

One interesting thing to think about is that in some cases such as #565, the translation is the same between the two.
Whereas in other cases such as the aforementioned #477 they are different.

Activity

  1. Pi-Cla commented on Apr 10, 2023

    @Pi-Cla
    Author

    Another example of the two variants being different is #708.
    #SetEnum(10, "零壹贰叁肆伍陆柒捌玖拾")
    In Traditional would be: #SetEnum(10, "零壹貳參肆伍陸柒捌玖拾")
    Compare:
    贰 貳
    叁 參
    陆 陸

  2. laurmaedje commented on Apr 11, 2023

    @laurmaedje
    Member

    It seems as if there are separate language codes that we could use for this once per i18n is put into place? A quick search shows that there's zh-CN and zh-CHT. Would that be reasonable?

  3. added
    text
    on Apr 11, 2023
  4. Pi-Cla commented on Apr 11, 2023

    @Pi-Cla
    Author

    I think a more typical set of language codes would be zh-Hans and zh-Hant as seen in the IANA Subtag Registry.

  5. Fusyong commented on Apr 12, 2023

    @Fusyong

    A complete solution can be achieved using a combination of two elements:

    1.1. zh-CN and zh-CHS (default for zh-CN, can be used as a basis for other .. and zh-CHS)
    1.2. zh-CN and zh-CHT
    2.1. zh-TW and zh-CHT (default for zh-TW, can be used as a basis for other .. and zh-CHT)
    2.1. zh-TW and zh-CHS
    3.1. zh-HK and zh-CHT (default for zh-HK)
    3.1. zh-HK and zh-CHS
    4.1. zh-MO and zh-CHT (default for zh-MO)
    4.2. zh-MO and zh-CHS
    5.1. zh-SG and zh-CHS (default for zh-SG)
    5.2. zh-SG and zh-CHT

    It is recommended to keep all of these items, although some of them are rarely used or are largely consistent with others.

  6. added
    feature request
    on May 25, 2023
  7. YDX-2147483647 commented on Nov 11, 2026

    @YDX-2147483647
    Contributor

    It looks like this issue can be closed?

    With the support of #set text(lang: "zh", region: "TW") added in #926 in 2023, it's now possible to distinguish Traditional Chinese from Simplified Chinese. The actual translation strings were also added in #1000.

    Other problems mentioned here have been covered by specialized issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requesttext

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions