SuperAPI AI Directory

locale-aware-formatter

Office & productivity

View repository

Updated 10-15 20:04

About this skill

Cultural Adaptive Formatting

Automatically adapt document formatting based on language and cultural context: date formats, currency symbols, letter styles, number separators, and forms of address etiquette.

Use Cases

  • User says "Help me write a business letter" → automatically adapt to the letter format of the corresponding language
  • User says "Format this report" → dates, numbers, and currency are presented according to the user's locale
  • User says "Convert this document to formal format" → adapt to the formal conventions of the corresponding culture

Execution Method

Through LLM combined with system locale detection, automatically adapt to cultural conventions.

Locale Detection

# 检测系统语言设置
echo $LANG
# macOS 额外检测
defaults read NSGlobalDomain AppleLanguages 2>/dev/null

Format Adaptation Rules

Date Format

Locale Format Example
en-US MM/DD/YYYY 02/09/2026
en-GB DD/MM/YYYY 09/02/2026
zh-CN YYYY年MM月DD日 2026年02月09日
ja-JP YYYY年MM月DD日 2026年02月09日
de-DE DD.MM.YYYY 09.02.2026

Numbers and Currency

Locale Thousands Separator Decimal Point Currency
en-US 1,000.00 . $1,000.00
de-DE 1.000,00 , 1.000,00 €
zh-CN 1,000.00 . ¥1,000.00
ja-JP 1,000 . ¥1,000

Business Letter Format

English (formal):

Dear Mr./Ms. [Last Name],

[Body]

Sincerely,
[Full Name]
[Title]

Chinese (Formal):

[职务] [姓名] :

[正文]

此致
敬礼

[署名]
[日期]

日本語(敬語):

[会社名]
[部署名] [役職] [名前] 様

[本文]

敬具

[署名]
[日付]

Forms of Address Etiquette

Culture Convention
English Mr./Ms./Dr. + Last Name (first time), First Name (after familiarity)
中文 Surname + Job Title (Wang Zong, Li Jingli), or Surname + Mr./Ms.
日本語 Surname + 様/さん, or Surname + Job Title when using a title
Korean 성 + 님/씨

Output Specifications

  • Automatically detect the conversation language and adapt the format
  • If the OS locale is detected to differ from the conversation language, ask the user for their preference
  • Keep the core content unchanged; only adjust the formatting and etiquette layer
  • Do not force conversion—when the user explicitly specifies a format, the user's request takes priority