← All Learning Paths

Internationalization Engineer

Ship one product to every locale: Unicode collation, timezone-safe timestamps, plural rules, slug safety, and the collation and encoding bugs that break markets.

rolebeginner10 nodes14.33h total

Path overview

国际化的失败很少在翻译层,而在排序、时间与编码的地基。本路径从 Unicode 排序与时区讲起,比较三大日期库的本地化能力,再实操复数规则、相对时间与时区安全转换,收尾于 Windows 编码与 MySQL 排序规则两类经典故障。

Internationalization fails at the foundation — collation, time, encoding — not at translation. This path covers Unicode collation, timezone-safe timestamps, plural rules, and classic encoding bugs.

  1. Reconstruct the reasoning behind "How to Handle Timezones in Databases" by tracing "Two types, two meanings" to the failure it prevents in i18n systems.

    Completion criteria: Record a short walkthrough of "How to Handle Timezones in Databases" with timestamps at "Two types, two meanings" and "Pin the session and driver", plus the commit that applies it.

    Next step: Date-fns

    ⏱ 1h

  2. Wire "Date-fns" into a scratch i18n project, following "format format(date: Date | number, format: string, options?: FormatOptions): string", and record one working request/response pair.

    Prerequisites: How to Handle Timezones in Databases

    Completion criteria: Attach one successful call and one invalid call against "Date-fns", citing "format format(date: Date | number, format: string, options?: FormatOptions): string" as the documented surface.

    Next step: Day.js

    ⏱ 1h

  3. Wire "Day.js" into a scratch i18n project, invoke dayjs() dayjs(date?, format?, strict?): Dayjs, and record the error path.

    Prerequisites: Date-fns

    Completion criteria: Show one successful call to dayjs() dayjs(date?, format?, strict?): Dayjs and one invalid call, with the returned status code and message for each.

    Next step: Luxon

    ⏱ 1h

  4. Exercise DateTime.now() DateTime.now(): DateTime and DateTime.fromISO DateTime.fromISO(text, opts?): DateTime from "Luxon", documenting request, response, and failure.

    Prerequisites: Day.js

    Completion criteria: Attach the request, response, and error code from "Luxon"; annotate which field caused the failure.

    Next step: Pluralize Counts With Intl.PluralRules

    ⏱ 1h

  5. Run the i18n snippet "Pluralize Counts With Intl.PluralRules", capture stdout, and show which line demonstrates the documented behavior: "Choose singular or plural forms by CLDR plural category, including custom two and few forms".

    Prerequisites: Luxon

    Completion criteria: Change one constant in "Pluralize Counts With Intl.PluralRules", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Relative Time Labels With Intl

    ⏱ 0.75h

  6. Adapt "Relative Time Labels With Intl" to a second input and compare the new output with the behavior described in "the DIVISIONS entry point".

    Prerequisites: Pluralize Counts With Intl.PluralRules

    Completion criteria: Paste the command, the exit code, and the output line matching "the DIVISIONS entry point"; then show a second run with a changed parameter.

    Next step: Dayjs Timezone-Safe Date Conversion

    ⏱ 0.75h

  7. Execute "Dayjs Timezone-Safe Date Conversion", change one constant, and describe how the output diverges from "Convert timestamps between timezones with Dayjs and its UTC plugin, keeping wall-clock".

    Prerequisites: Relative Time Labels With Intl

    Completion criteria: Save two runs of "Dayjs Timezone-Safe Date Conversion" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: Turn Unicode Titles into URL Slugs

    ⏱ 0.75h

  8. Run the i18n snippet "Turn Unicode Titles into URL Slugs", capture stdout, and show which line demonstrates the documented behavior: "Turn Unicode headings into stable ASCII URL slugs with transliteration, separator".

    Prerequisites: Dayjs Timezone-Safe Date Conversion

    Completion criteria: Change one constant in "Turn Unicode Titles into URL Slugs", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Select the Right Plural Form

    ⏱ 0.75h

  9. Build "Select the Right Plural Form" for i18n code and verify 1 file against both samples.

    Completion criteria: Submit a solution for "Internationalization Engineer" that passes both samples ({locale:en,count:1,template:{count} file|{count} files} to 1 file) and attach the failing case you fixed.

    Next step: Capstone: Internationalization Engineer

    ⏱ 0.33h

  10. Ship "Support if and else blocks with truthiness evaluation." from "Build a Text Template Rendering Library", then prove it with the project's test suite and an acceptance note.

    Prerequisites: Select the Right Plural Form

    Completion criteria: Run the project's test command for "Build a Text Template Rendering Library", paste the passing output, and attach the acceptance note for "Support if and else blocks with truthiness evaluation." with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h