i18n.js 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. /* DoTouch.AI 官网 v1.1.0 — 多语言词典(默认越南语)+ 切换器 + 货币引擎 */
  2. /* 汇率占位:1 USD = 25,400 VND;1 USD = 7.20 CNY(TODO: 接入实时汇率 API) */
  3. const FX_RATE_VND = 25400;
  4. const FX_RATE_CNY = 7.2;
  5. /* 按语言(地区)切换货币:vi→VND / en→USD / zh-CN·zh-TW→CNY */
  6. const CURRENCY = {
  7. en: { sym: '$', rate: 1, dec: 2, suffix: '', name: 'USD' },
  8. vi: { sym: '', rate: FX_RATE_VND, dec: 0, suffix: '₫', name: 'VND' },
  9. 'zh-CN': { sym: '¥', rate: FX_RATE_CNY, dec: 2, suffix: '', name: 'CNY' },
  10. 'zh-TW': { sym: '¥', rate: FX_RATE_CNY, dec: 2, suffix: '', name: 'CNY' }
  11. };
  12. function fmtPrice(usdValue) {
  13. const cur = CURRENCY[document.documentElement.lang] || CURRENCY.en;
  14. const val = usdValue * cur.rate;
  15. let num = cur.dec === 0
  16. ? Math.round(val).toLocaleString('en-US').replace(/,/g, '.')
  17. : val.toFixed(cur.dec);
  18. return cur.sym + num + cur.suffix;
  19. }
  20. function applyCurrency() {
  21. document.querySelectorAll('[data-usd]').forEach(el => {
  22. el.textContent = fmtPrice(parseFloat(el.dataset.usd));
  23. });
  24. }
  25. const I18N = {
  26. /* ═══════════ 越南语(默认) ═══════════ */
  27. vi: {
  28. nav_models:"Mô hình", nav_pricing:"Bảng giá", nav_docs:"Tài liệu", nav_login:"Đăng nhập", nav_signup:"Bắt đầu",
  29. crumb_home:"Trang chủ",
  30. /* ── 首页 ── */
  31. hero_badge:"Tương thích OpenAI · Bằng 70% giá Trung Quốc · Ưu tiên Việt Nam",
  32. hero_h1:"Một chạm.", hero_h1_grad:"Mọi AI.",
  33. hero_sub:"DoTouch.AI mang sức mạnh của các mô hình AI tiên phong Trung Quốc — GLM 5.2, DeepSeek V4 và hơn thế nữa — đến với nhà phát triển và doanh nghiệp nhỏ trên toàn thế giới với giá cực rẻ. API OpenAI tương thích. Rẻ hơn 30%. Không cần di chuyển.",
  34. hero_cta1:"Bắt đầu miễn phí", hero_cta2:"Xem bảng giá",
  35. stat_models:"4+", stat_models_l:"Mô hình tiên phong", stat_save:"30%", stat_save_l:"Rẻ hơn giá Trung Quốc",
  36. stat_api:"100%", stat_api_l:"Tương thích API OpenAI", stat_pay:"6+", stat_pay_l:"Phương thức thanh toán",
  37. models_kicker:"Mô hình", models_h2:"Mô hình AI Trung Quốc, một API duy nhất",
  38. models_p:"Tất cả mô hình được phục vụ qua Alibaba Cloud DashScope, tương thích hoàn toàn OpenAI. Xem chi tiết từng mô hình.",
  39. model_link:"Chi tiết",
  40. price_in:"Đầu vào", price_out:"Đầu ra",
  41. pricing_kicker:"Bảng giá", pricing_h2:"Chỉ trả cho những gì bạn dùng",
  42. pricing_p:"Trả trước, tính theo token. Không thuê bao — nạp tiền bất cứ lúc nào. Giá bằng 70% giá nội địa Trung Quốc, hiển thị bằng USD & VND.",
  43. pt_model:"Mô hình", pt_in:"Đầu vào / 1M token", pt_out:"Đầu ra / 1M token", pt_save:"Tiết kiệm",
  44. pricing_more:"Xem bảng giá đầy đủ →",
  45. feat_kicker:"Vì sao DoTouch", feat_h2:"Dành cho lập trình viên, giá cho mọi người",
  46. f1_t:"Tương thích OpenAI tức thì", f1_d:"Đổi một dòng cấu hình SDK OpenAI là mọi thứ hoạt động.",
  47. f2_t:"Bằng 70% giá Trung Quốc", f2_d:"Mô hình Trung Quốc với giá Trung Quốc, thanh toán bằng USD hoặc VND.",
  48. f3_t:"Thanh toán nội địa", f3_d:"MoMo, ZaloPay, Stripe, PayPal, Alipay và thẻ ngân hàng.",
  49. f4_t:"Hỗ trợ ưu tiên Việt Nam", f4_d:"Console, tài liệu và hỗ trợ tiếng Việt.",
  50. f5_t:"Độ trễ thấp, uptime cao", f5_d:"Edge node tại Hồng Kông kết nối trực tiếp nguồn cấp.",
  51. f6_t:"Sử dụng minh bạch", f6_d:"Bản ghi token & chi phí từng request, tổng kết theo ngày.",
  52. pay_kicker:"Thanh toán", pay_h2:"Thanh toán theo cách của bạn", pay_card:"Thẻ ngân hàng",
  53. how_kicker:"Bắt đầu nhanh", how_h2:"Hoạt động sau 3 bước",
  54. s1_t:"Tạo tài khoản", s1_d:"Đăng ký email, nạp tiền bao nhiêu tùy ý.",
  55. s2_t:"Tạo API key", s2_d:"Một cú click trong console. Key bắt đầu bằng dt_.",
  56. s3_t:"Gọi API", s3_d:"Trỏ OpenAI SDK vào api.dotouch.ai. Xong.",
  57. faq_kicker:"FAQ", faq_h2:"Câu hỏi thường gặp",
  58. q1:"Hóa đơn hoạt động thế nào?", a1:"Chỉ trả trước. Nạp tín dụng, mỗi request được đo theo token và trừ từ số dư. Không thuê bao, không hóa đơn bất ngờ.",
  59. q2:"Có thực sự tương thích OpenAI không?", a2:"Có. Cùng endpoint, định dạng request, streaming (SSE) và lỗi. Trỏ OpenAI SDK hiện có vào base URL của chúng tôi là xong.",
  60. q3:"Thanh toán bằng loại tiền nào?", a3:"Hiển thị USD và VND. Thanh toán qua MoMo, ZaloPay, Stripe, PayPal, Alipay và thẻ ngân hàng. Tỷ giá áp dụng tại thời điểm nạp tiền.",
  61. q4:"Có những mô hình nào?", a4:"GLM 5.2, DeepSeek V4, DeepSeek V4 Pro, Qwen Max — và nhiều mô hình đang được bổ sung liên tục.",
  62. q5:"Có mức nạp tối thiểu không?", a5:"Không. Bắt đầu với bất kỳ số tiền nào — thậm chí $1.",
  63. q6:"Dữ liệu của tôi có an toàn không?", a6:"API của bạn được xử lý qua Alibaba Cloud DashScope theo điều khoản áp dụng. Chúng tôi không bao giờ huấn luyện trên dữ liệu của bạn.",
  64. cta_h2:"Một chạm. Mọi AI. Rẻ hơn 30%.", cta_p:"Tham gia cùng lập trình viên khắp Việt Nam và thế giới.", cta_btn:"Tạo tài khoản miễn phí",
  65. rate_note:"Tỷ giá tham khảo: 1 USD ≈ 25.400₫ (cập nhật tự động khi nạp tiền)",
  66. foot_p:"AI Trung Quốc giá rẻ cho lập trình viên và doanh nghiệp nhỏ trên toàn thế giới.",
  67. foot_product:"Sản phẩm", foot_console:"Console", foot_status:"Trạng thái", foot_dev:"Nhà phát triển",
  68. foot_docs:"Tài liệu", foot_quickstart:"Bắt đầu nhanh", foot_support:"Hỗ trợ", foot_legal:"Pháp lý",
  69. foot_tos:"Điều khoản dịch vụ", foot_privacy:"Chính sách bảo mật", foot_refund:"Chính sách hoàn tiền",
  70. foot_made:"Thế giới mã nguồn mở · AI phổ cập",
  71. chat_title:"Trợ giúp & Hỗ trợ", chat_online:"Trực tuyến", chat_hello:"Xin chào! Chúng tôi có thể giúp gì cho bạn?", chat_input:"Nhập tin nhắn...", chat_q_balance:"Làm sao để nạp tiền?", chat_q_key:"Tạo API key thế nào?", chat_q_model:"Nên chọn mô hình nào?",
  72. auth_login_title:"Đăng nhập", auth_register_title:"Tạo tài khoản", auth_reset_title:"Đặt lại mật khẩu",
  73. auth_email:"Email", auth_password:"Mật khẩu", auth_confirm:"Xác nhận mật khẩu", auth_new_pwd:"Mật khẩu mới", auth_confirm_new:"Xác nhận mật khẩu mới",
  74. auth_code_label:"Mã xác minh", auth_code_send:"Gửi mã", auth_code_resend:"Gửi lại ({s}s)", auth_code_note:"Mã gồm 8 ký tự chữ hoa & số, hiệu lực 15 phút",
  75. auth_code_sent:"✓ Đã gửi mã đến {email}. Vui lòng nhập mã trong 15 phút.",
  76. auth_login_btn:"Đăng nhập", auth_register_btn:"Đăng ký", auth_reset_btn:"Đặt lại mật khẩu",
  77. auth_forgot:"Quên mật khẩu?", auth_to_register:"Tạo tài khoản", auth_to_login:"Đã có tài khoản? Đăng nhập", auth_back_login:"Quay lại đăng nhập",
  78. auth_err_pwd:"Mật khẩu không khớp", auth_err_email:"Email không hợp lệ", auth_err_code:"Mã xác minh phải gồm 8 ký tự chữ hoa & số",
  79. nav_home:"Trang chủ", nav_docs_ops:"Hướng dẫn", nav_console:"Console",
  80. c_overview:"Tổng quan", c_keys:"API Keys", c_wallet:"Nạp tiền", c_usage:"Sử dụng",
  81. c_welcome:"Chào mừng trở lại", c_balance:"Số dư", c_today_req:"Yêu cầu hôm nay", c_today_tokens:"Token hôm nay", c_active_keys:"API Key đang hoạt động",
  82. c_usage_7d:"Sử dụng 7 ngày qua", c_recent_tx:"Giao dịch gần đây", c_see_all:"Xem chi tiết →",
  83. c_create_key:"+ Tạo API Key", c_key_name:"Tên Key", c_key_expire:"Hết hạn (tùy chọn)", c_key_create_btn:"+ Tạo Key",
  84. c_key_once:"⚠️ Key sẽ chỉ được hiển thị một lần sau khi tạo. Hãy lưu ngay.",
  85. c_t_name:"Tên", c_t_key:"Key", c_t_status:"Trạng thái", c_t_last:"Sử dụng gần nhất", c_t_created:"Tạo lúc", c_t_action:"Thao tác",
  86. c_rotate:"Đổi key", c_revoke:"Thu hồi", c_reactivate:"Kích hoạt lại", c_delete:"Xóa",
  87. c_security:"🔒 Bảo mật: Key được lưu dạng băm SHA-256. Đổi key = thu hồi + tạo mới.",
  88. c_avail:"Số dư khả dụng", c_month_topup:"Đã nạp (tháng này)", c_select_amount:"Chọn số tiền nạp", c_pay_method:"Phương thức thanh toán", c_topup_now:"Nạp ngay",
  89. c_deposit_history:"Lịch sử nạp", c_t_time:"Thời gian", c_t_type:"Loại", c_t_amount:"Số tiền", c_t_ref:"Tham chiếu",
  90. c_7days:"7 ngày", c_30days:"30 ngày", c_by_model:"Theo mô hình (7 ngày)", c_requests:"Yêu cầu", c_cost:"Chi phí",
  91. c_total:"Tổng quan",
  92. c_sub_today:"so với hôm qua", c_key_meta:"1 đã thu hồi · 1 sắp hết hạn", c_inout:"in 3.1M · out 1.1M", c_req_unit:"req",
  93. c_st_active:"active", c_st_expired:"expired", c_st_revoked:"revoked", c_st_success:"success", c_tx_usage:"usage", c_tx_deposit:"deposit",
  94. c_this_month:"tháng này", c_topup_sub:"2 giao dịch", c_tokens:"Token", c_usage_note:"Chi tiết từng request có sẵn tại GET /v1/usage (phân trang).",
  95. q_limits:"Giới hạn", q_daily:"Hằng ngày", q_total:"Tổng", q_req:"Yêu cầu", q_cost:"Chi phí",
  96. q_alert_pct:"Cảnh báo tại", q_edit:"Cấu hình giới hạn", q_save:"Lưu", q_unlimited:"Không giới hạn",
  97. q_progress:"Đã dùng", q_blocked:"Đã chặn", q_warning:"Sắp đạt giới hạn",
  98. q_banner:"Nhắc nhở sử dụng", q_banner_80:"Đã đạt 80% giới hạn hằng ngày, vui lòng kiểm tra.",
  99. q_banner_100:"Đã vượt giới hạn, yêu cầu sẽ bị từ chối (429).",
  100. q_quota_manage:"Quản lý giới hạn", q_over:"Vượt hạn", q_ok:"Bình thường", q_events:"Sự kiện giới hạn",
  101. /* ── Models 列表页 ── */
  102. models_ph:"Tìm mô hình...", filter_all:"Tất cả", filter_flagship:"Cao cấp", filter_value:"Đáng giá", filter_reasoning:"Suy luận", filter_enterprise:"Doanh nghiệp",
  103. m_col_model:"Mô hình", m_col_vendor:"Nhà cung cấp", m_col_ctx:"Ngữ cảnh", m_col_in:"Đầu vào", m_col_out:"Đầu ra", m_col_action:"",
  104. m_glm_name:"GLM 5.2", m_glm_vendor:"Zhipu AI", m_glm_ctx:"128K", m_glm_short:"Mô hình đa phương thức hàng đầu, suy luận + lập trình + tác vụ agent.",
  105. m_dsv4_name:"DeepSeek V4", m_dsv4_vendor:"DeepSeek", m_dsv4_ctx:"1M", m_dsv4_short:"Cỗ máy suy luận mã nguồn mở, lý tưởng cho chat & RAG khối lượng lớn.",
  106. m_dsv4p_name:"DeepSeek V4 Pro", m_dsv4p_vendor:"DeepSeek", m_dsv4p_ctx:"1M", m_dsv4p_short:"Suy luận sâu cho toán học, logic và kế hoạch agent dài hạn.",
  107. m_qwen_name:"Qwen Max", m_qwen_vendor:"Alibaba", m_qwen_ctx:"256K", m_qwen_short:"Mô hình tổng quát mạnh nhất, đa ngôn ngữ & gọi công cụ.",
  108. m_see_detail:"Xem chi tiết →", m_ctx_tokens:"tokens",
  109. tag_flagship:"Cao cấp", tag_best:"Đáng giá", tag_reasoning:"Suy luận", tag_enterprise:"Doanh nghiệp",
  110. models_count:"mô hình có sẵn",
  111. /* ── 模型详情页 ── */
  112. detail_bread:"Mô hình", detail_overview:"Tổng quan",
  113. detail_use_btn:"Bắt đầu với API này",
  114. detail_spec:"Thông số kỹ thuật", detail_spec_vendor:"Nhà cung cấp", detail_spec_ctx:"Ngữ cảnh", detail_spec_out:"Đầu ra tối đa", detail_spec_base:"BASE URL", detail_spec_rate:"Giới hạn tốc độ",
  115. detail_cap:"Khả năng", detail_cap_json:"JSON Output", detail_cap_tool:"Tool Calls", detail_cap_stream:"Streaming (SSE)", detail_cap_think:"Chế độ suy luận",
  116. detail_pricing:"Giá", detail_pricing_note:"Giá mỗi 1 triệu tokens · đã gồm ưu đãi 70% giá Trung Quốc",
  117. detail_price_in:"Đầu vào", detail_price_out:"Đầu ra",
  118. detail_code:"Ví dụ gọi API", detail_code_tab_curl:"cURL", detail_code_tab_py:"Python SDK",
  119. detail_rel:"Mô hình liên quan", detail_rel_view:"Xem tất cả mô hình →",
  120. detail_billing:"Quy tắc tính phí", detail_billing_p:"Phí = token tiêu thụ × đơn giá, trừ trực tiếp từ số dư nạp trước. Giá có thể thay đổi; xem trang này để cập nhật mới nhất.",
  121. spec_ok:"Hỗ trợ", spec_no:"Không hỗ trợ",
  122. /* ── 定价页 ── */
  123. price_h1:"Bảng giá", price_sub:"Tất cả giá đã bằng 70% giá nội địa Trung Quốc. Hiển thị USD và VND theo tỷ giá hiện tại.",
  124. price_th_model:"Mô hình", price_th_in:"Đầu vào / 1M", price_th_out:"Đầu ra / 1M", price_th_save:"Tiết kiệm",
  125. price_rule:"Quy tắc tính phí", price_rule_p:"Phí = token × đơn giá, trừ từ số dư. Không thuê bao, không cam kết. Tỷ giá VND áp dụng tại thời điểm nạp tiền.",
  126. price_faq:"Câu hỏi về giá", price_note:"* Giá đang là tạm tính, chờ xác nhận giá DashScope × 0.7.",
  127. /* ── 文档页 ── */
  128. docs_h1:"Tài liệu", docs_sub:"Bắt đầu nhanh, API Reference và quy tắc tính phí.",
  129. docs_sidebar_start:"Bắt đầu nhanh", docs_sidebar_api:"API Reference", docs_sidebar_errors:"Mã lỗi", docs_sidebar_billing:"Tính phí",
  130. docs_start_h:"Bắt đầu nhanh", docs_start_p:"3 bước để gọi mô hình đầu tiên.",
  131. docs_start_s1:"Tạo tài khoản & nạp tiền", docs_start_s2:"Tạo API key (tiền tố dt_)", docs_start_s3:"Gọi API tương thích OpenAI",
  132. docs_api_h:"API Reference", docs_api_endpoint:"Endpoint", docs_api_models:"Danh sách mô hình", docs_api_models_p:"GET /v1/models — không cần xác thực.",
  133. docs_api_chat:"Chat Completions", docs_api_chat_p:"POST /v1/chat/completions — xác thực bằng Bearer API key. Hỗ trợ streaming SSE.",
  134. docs_err_h:"Mã lỗi", docs_err_401:"API key không hợp lệ", docs_err_402:"Số dư không đủ", docs_err_404:"Mô hình không tồn tại", docs_err_429:"Vượt giới hạn tốc độ",
  135. docs_bill_h:"Tính phí", docs_bill_p:"Phí = token × đơn giá (USD), quy đổi VND theo tỷ giá tại thời điểm nạp tiền. Lịch sử giao dịch trong Console.",
  136. code_copy:"Sao chép"
  137. },
  138. /* ═══════════ 英语 ═══════════ */
  139. en: {
  140. nav_models:"Models", nav_pricing:"Pricing", nav_docs:"Docs", nav_login:"Log in", nav_signup:"Get Started",
  141. crumb_home:"Home",
  142. hero_badge:"OpenAI Compatible · From 70% of China Price · Vietnam-First",
  143. hero_h1:"One Touch.", hero_h1_grad:"All AI.",
  144. hero_sub:"DoTouch.AI brings the power of Chinese frontier models — GLM 5.2, DeepSeek V4 and more — to developers and small businesses worldwide at unbelievably low prices. Same OpenAI API. 30% cheaper. Zero migration.",
  145. hero_cta1:"Start for Free", hero_cta2:"View Pricing",
  146. stat_models:"4+", stat_models_l:"Frontier models", stat_save:"30%", stat_save_l:"Cheaper than China price",
  147. stat_api:"100%", stat_api_l:"OpenAI API compatible", stat_pay:"6+", stat_pay_l:"Payment methods",
  148. models_kicker:"Models", models_h2:"Chinese Frontier Models, One API",
  149. models_p:"All models are served through Alibaba Cloud DashScope, fully OpenAI-compatible. Explore each model in detail.",
  150. model_link:"Details",
  151. price_in:"Input", price_out:"Output",
  152. pricing_kicker:"Pricing", pricing_h2:"Pay Only for What You Use",
  153. pricing_p:"Prepaid, metered per token. No subscription — top up anytime. Prices are 70% of the China domestic price, shown in USD & VND.",
  154. pt_model:"Model", pt_in:"Input / 1M tokens", pt_out:"Output / 1M tokens", pt_save:"You save",
  155. pricing_more:"View full pricing →",
  156. feat_kicker:"Why DoTouch", feat_h2:"Built for Developers, Priced for Everyone",
  157. f1_t:"Drop-in OpenAI Compatible", f1_d:"Change one line in your OpenAI SDK config and everything works.",
  158. f2_t:"70% of China Price", f2_d:"Chinese models at Chinese prices, paid in USD or VND.",
  159. f3_t:"Local Payments", f3_d:"MoMo, ZaloPay, Stripe, PayPal, Alipay and bank cards.",
  160. f4_t:"Vietnam-First Support", f4_d:"Vietnamese console, docs and support.",
  161. f5_t:"Low Latency, High Uptime", f5_d:"Hong Kong edge nodes with a direct line to upstream.",
  162. f6_t:"Transparent Usage", f6_d:"Per-request token & cost records, daily summaries.",
  163. pay_kicker:"Payments", pay_h2:"Pay Your Way", pay_card:"Bank Card",
  164. how_kicker:"Quickstart", how_h2:"Live in 3 Steps",
  165. s1_t:"Create your account", s1_d:"Sign up with email, top up any amount.",
  166. s2_t:"Generate an API key", s2_d:"One click in the console. Keys start with dt_.",
  167. s3_t:"Call the API", s3_d:"Point your OpenAI SDK at api.dotouch.ai. Done.",
  168. faq_kicker:"FAQ", faq_h2:"Questions, Answered",
  169. q1:"How does billing work?", a1:"Prepaid only. Top up credits, then each request is metered per token and deducted from your balance. No subscription, no surprise invoices.",
  170. q2:"Is it really OpenAI-compatible?", a2:"Yes. Same endpoints, request shapes, streaming (SSE) and error format. Point your existing OpenAI SDK at our base URL and you're done.",
  171. q3:"Which currencies can I pay in?", a3:"USD and VND display. Payments via MoMo, ZaloPay, Stripe, PayPal, Alipay and bank cards. Exchange rate applied at top-up time.",
  172. q4:"What models are available?", a4:"GLM 5.2, DeepSeek V4, DeepSeek V4 Pro, Qwen Max — with more being added continuously.",
  173. q5:"Is there a minimum top-up?", a5:"No. Start with any amount — even $1.",
  174. q6:"Is my data safe?", a6:"Your API calls are processed through Alibaba Cloud DashScope under applicable terms. We never train on your data.",
  175. cta_h2:"One touch. All AI. 30% less.", cta_p:"Join developers across Vietnam and the world.", cta_btn:"Create Free Account",
  176. rate_note:"Prices shown in USD",
  177. foot_p:"Affordable Chinese frontier AI for developers and small businesses worldwide.",
  178. foot_product:"Product", foot_console:"Console", foot_status:"Status", foot_dev:"Developers",
  179. foot_docs:"Documentation", foot_quickstart:"Quickstart", foot_support:"Support", foot_legal:"Legal",
  180. foot_tos:"Terms of Service", foot_privacy:"Privacy Policy", foot_refund:"Refund Policy",
  181. foot_made:"Open-Source World · AI for Everyone",
  182. chat_title:"Help & Support", chat_online:"Online", chat_hello:"Hi! How can we help you today?", chat_input:"Type a message...", chat_q_balance:"How do I top up?", chat_q_key:"How do I create an API key?", chat_q_model:"Which model should I pick?",
  183. auth_login_title:"Log In", auth_register_title:"Sign Up", auth_reset_title:"Reset Password",
  184. auth_email:"Email", auth_password:"Password", auth_confirm:"Confirm password", auth_new_pwd:"New password", auth_confirm_new:"Confirm new password",
  185. auth_code_label:"Verification code", auth_code_send:"Send code", auth_code_resend:"Resend ({s}s)", auth_code_note:"8-character code (A-Z, 0-9), valid for 15 minutes",
  186. auth_code_sent:"✓ Code sent to {email}. Enter it within 15 minutes.",
  187. auth_login_btn:"Log In", auth_register_btn:"Sign Up", auth_reset_btn:"Reset Password",
  188. auth_forgot:"Forgot password?", auth_to_register:"Sign up", auth_to_login:"Already have an account? Log in", auth_back_login:"Back to log in",
  189. auth_err_pwd:"Passwords do not match", auth_err_email:"Invalid email address", auth_err_code:"Code must be 8 characters (A-Z, 0-9)",
  190. nav_home:"Home", nav_docs_ops:"Docs", nav_console:"Console",
  191. c_overview:"Overview", c_keys:"API Keys", c_wallet:"Top Up", c_usage:"Usage",
  192. c_welcome:"Welcome back", c_balance:"Balance", c_today_req:"Requests today", c_today_tokens:"Tokens today", c_active_keys:"Active API Keys",
  193. c_usage_7d:"Usage · last 7 days", c_recent_tx:"Recent transactions", c_see_all:"View details →",
  194. c_create_key:"+ Create API Key", c_key_name:"Key name", c_key_expire:"Expires (optional)", c_key_create_btn:"+ Create",
  195. c_key_once:"⚠️ The key is shown only once after creation. Save it now.",
  196. c_t_name:"Name", c_t_key:"Key", c_t_status:"Status", c_t_last:"Last used", c_t_created:"Created", c_t_action:"Actions",
  197. c_rotate:"Rotate", c_revoke:"Revoke", c_reactivate:"Reactivate", c_delete:"Delete",
  198. c_security:"🔒 Keys are stored as SHA-256 hashes. Rotate = revoke + create new.",
  199. c_avail:"Available balance", c_month_topup:"Top-ups (this month)", c_select_amount:"Select top-up amount", c_pay_method:"Payment method", c_topup_now:"Top Up Now",
  200. c_deposit_history:"Top-up history", c_t_time:"Time", c_t_type:"Type", c_t_amount:"Amount", c_t_ref:"Reference",
  201. c_7days:"7 days", c_30days:"30 days", c_by_model:"By model (7 days)", c_requests:"Requests", c_cost:"Cost",
  202. c_total:"Overview",
  203. c_sub_today:"vs yesterday", c_key_meta:"1 revoked · 1 expiring", c_inout:"in 3.1M · out 1.1M", c_req_unit:"req",
  204. c_st_active:"active", c_st_expired:"expired", c_st_revoked:"revoked", c_st_success:"success", c_tx_usage:"usage", c_tx_deposit:"deposit",
  205. c_this_month:"this month", c_topup_sub:"2 transactions", c_tokens:"Tokens", c_usage_note:"Per-request details available at GET /v1/usage (paginated).",
  206. q_limits:"Limits", q_daily:"Daily", q_total:"Total", q_req:"Requests", q_cost:"Cost",
  207. q_alert_pct:"Alert at", q_edit:"Edit limits", q_save:"Save", q_unlimited:"Unlimited",
  208. q_progress:"Used", q_blocked:"Blocked", q_warning:"Approaching limit",
  209. q_banner:"Usage alert", q_banner_80:"You have reached 80% of your daily limit. Please review.",
  210. q_banner_100:"Limit exceeded — requests will be rejected (429).",
  211. q_quota_manage:"Quota management", q_over:"Over", q_ok:"OK", q_events:"Quota events",
  212. models_ph:"Search models...", filter_all:"All", filter_flagship:"Flagship", filter_value:"Best Value", filter_reasoning:"Reasoning", filter_enterprise:"Enterprise",
  213. m_col_model:"Model", m_col_vendor:"Vendor", m_col_ctx:"Context", m_col_in:"Input", m_col_out:"Output", m_col_action:"",
  214. m_glm_name:"GLM 5.2", m_glm_vendor:"Zhipu AI", m_glm_ctx:"128K", m_glm_short:"Flagship multimodal model. Reasoning, coding and agentic tasks.",
  215. m_dsv4_name:"DeepSeek V4", m_dsv4_vendor:"DeepSeek", m_dsv4_ctx:"1M", m_dsv4_short:"Open-weight reasoning powerhouse. Ideal for high-volume chat & RAG.",
  216. m_dsv4p_name:"DeepSeek V4 Pro", m_dsv4p_vendor:"DeepSeek", m_dsv4p_ctx:"1M", m_dsv4p_short:"Deep reasoning for complex math, logic and long-horizon planning.",
  217. m_qwen_name:"Qwen Max", m_qwen_vendor:"Alibaba", m_qwen_ctx:"256K", m_qwen_short:"Strongest general model. Multilingual & tool-calling ready.",
  218. m_see_detail:"View details →", m_ctx_tokens:"tokens",
  219. tag_flagship:"Flagship", tag_best:"Best Value", tag_reasoning:"Reasoning", tag_enterprise:"Enterprise",
  220. models_count:"models available",
  221. detail_bread:"Models", detail_overview:"Overview",
  222. detail_use_btn:"Start with this model",
  223. detail_spec:"Specifications", detail_spec_vendor:"Vendor", detail_spec_ctx:"Context window", detail_spec_out:"Max output", detail_spec_base:"BASE URL", detail_spec_rate:"Rate limit",
  224. detail_cap:"Capabilities", detail_cap_json:"JSON Output", detail_cap_tool:"Tool Calls", detail_cap_stream:"Streaming (SSE)", detail_cap_think:"Thinking mode",
  225. detail_pricing:"Pricing", detail_pricing_note:"Per 1M tokens · 70% of China price included",
  226. detail_price_in:"Input", detail_price_out:"Output",
  227. detail_code:"API Example", detail_code_tab_curl:"cURL", detail_code_tab_py:"Python SDK",
  228. detail_rel:"Related models", detail_rel_view:"View all models →",
  229. detail_billing:"Billing rules", detail_billing_p:"Cost = tokens × unit price, deducted from your prepaid balance. Prices may change; check this page for the latest.",
  230. spec_ok:"Supported", spec_no:"Not supported",
  231. price_h1:"Pricing", price_sub:"All prices are 70% of the China domestic price. Shown in USD and VND at the current rate.",
  232. price_th_model:"Model", price_th_in:"Input / 1M", price_th_out:"Output / 1M", price_th_save:"You save",
  233. price_rule:"Billing rules", price_rule_p:"Cost = tokens × unit price, deducted from balance. No subscription, no commitment. VND rate applied at top-up.",
  234. price_faq:"Pricing FAQ", price_note:"* Prices are placeholders pending DashScope × 0.7 confirmation.",
  235. docs_h1:"Documentation", docs_sub:"Quickstart, API reference and billing rules.",
  236. docs_sidebar_start:"Quickstart", docs_sidebar_api:"API Reference", docs_sidebar_errors:"Error Codes", docs_sidebar_billing:"Billing",
  237. docs_start_h:"Quickstart", docs_start_p:"3 steps to call your first model.",
  238. docs_start_s1:"Create account & top up", docs_start_s2:"Create an API key (dt_ prefix)", docs_start_s3:"Call the OpenAI-compatible API",
  239. docs_api_h:"API Reference", docs_api_endpoint:"Endpoint", docs_api_models:"List models", docs_api_models_p:"GET /v1/models — no auth required.",
  240. docs_api_chat:"Chat Completions", docs_api_chat_p:"POST /v1/chat/completions — Bearer API key auth. SSE streaming supported.",
  241. docs_err_h:"Error Codes", docs_err_401:"Invalid API key", docs_err_402:"Insufficient balance", docs_err_404:"Model not found", docs_err_429:"Rate limit exceeded",
  242. docs_bill_h:"Billing", docs_bill_p:"Cost = tokens × unit price (USD), converted to VND at top-up rate. Full transaction history in Console.",
  243. code_copy:"Copy"
  244. },
  245. /* ═══════════ 简体中文 ═══════════ */
  246. "zh-CN": {
  247. nav_models:"模型", nav_pricing:"定价", nav_docs:"文档", nav_login:"登录", nav_signup:"立即开始",
  248. crumb_home:"首页",
  249. hero_badge:"OpenAI 兼容 · 国内价 7 折 · 越南优先",
  250. hero_h1:"一点触达", hero_h1_grad:"全部 AI。",
  251. hero_sub:"DoTouch.AI 将中国前沿大模型——GLM 5.2、DeepSeek V4 等——以难以置信的低价带给全球开发者与中小企业。同样的 OpenAI API,便宜 30%,零迁移成本。",
  252. hero_cta1:"免费开始", hero_cta2:"查看定价",
  253. stat_models:"4+", stat_models_l:"前沿模型", stat_save:"30%", stat_save_l:"低于国内价格",
  254. stat_api:"100%", stat_api_l:"OpenAI API 兼容", stat_pay:"6+", stat_pay_l:"支付方式",
  255. models_kicker:"模型", models_h2:"中国前沿模型,一个 API",
  256. models_p:"所有模型经由阿里云百炼提供服务,完全兼容 OpenAI 格式。可查看每个模型的详细信息。",
  257. model_link:"详情",
  258. price_in:"输入", price_out:"输出",
  259. pricing_kicker:"定价", pricing_h2:"按用量付费",
  260. pricing_p:"预充值,按 token 计量。无订阅——随时充值。价格 = 国内价 7 折,以美元与越南盾双币种显示。",
  261. pt_model:"模型", pt_in:"输入 / 1M tokens", pt_out:"输出 / 1M tokens", pt_save:"节省",
  262. pricing_more:"查看完整定价 →",
  263. feat_kicker:"为什么选择 DoTouch", feat_h2:"为开发者而生,人人用得起",
  264. f1_t:"无缝兼容 OpenAI", f1_d:"改一行 OpenAI SDK 配置即可使用。",
  265. f2_t:"国内价 7 折", f2_d:"中国模型、中国价格,美元或越南盾支付。",
  266. f3_t:"本地化支付", f3_d:"MoMo、ZaloPay、Stripe、PayPal、Alipay 与银行卡。",
  267. f4_t:"越南优先支持", f4_d:"越南语控制台、文档与客服。",
  268. f5_t:"低延迟高可用", f5_d:"香港边缘节点直连上游容量。",
  269. f6_t:"用量透明", f6_d:"每次请求的 token 与费用记录、按日汇总。",
  270. pay_kicker:"支付", pay_h2:"按你的方式付款", pay_card:"银行卡",
  271. how_kicker:"快速开始", how_h2:"三步上线",
  272. s1_t:"创建账号", s1_d:"邮箱注册,任意金额充值。",
  273. s2_t:"生成 API Key", s2_d:"控制台一键生成,dt_ 前缀。",
  274. s3_t:"调用 API", s3_d:"把 OpenAI SDK 指向 api.dotouch.ai,完成。",
  275. faq_kicker:"常见问题", faq_h2:"常见问题解答",
  276. q1:"计费方式是什么?", a1:"仅预充值。充值后每次请求按 token 计量并从余额扣除。无订阅、无意外账单。",
  277. q2:"真的兼容 OpenAI 吗?", a2:"是的。相同的端点、请求结构、流式(SSE)与错误格式。现有 OpenAI SDK 只需换 base URL。",
  278. q3:"支持哪些币种?", a3:"支持美元与越南盾显示。支付支持 MoMo、ZaloPay、Stripe、PayPal、Alipay 与银行卡,按充值时的汇率结算。",
  279. q4:"有哪些模型?", a4:"GLM 5.2、DeepSeek V4、DeepSeek V4 Pro、Qwen Max——更多模型持续上架中。",
  280. q5:"有最低充值限制吗?", a5:"没有。任意金额起步——哪怕 $1。",
  281. q6:"我的数据安全吗?", a6:"你的 API 调用经由阿里云百炼处理并遵守适用条款。我们绝不用你的数据训练模型。",
  282. cta_h2:"一点触达。全部 AI。省 30%。", cta_p:"加入越南及全球开发者的 DoTouch.AI 社区。", cta_btn:"免费创建账号",
  283. rate_note:"参考汇率:1 USD ≈ ¥7.20(充值时刻自动更新)",
  284. foot_p:"为全球开发者与中小企业提供平价中国前沿 AI。",
  285. foot_product:"产品", foot_console:"控制台", foot_status:"状态", foot_dev:"开发者",
  286. foot_docs:"文档", foot_quickstart:"快速开始", foot_support:"支持", foot_legal:"法律",
  287. foot_tos:"服务条款", foot_privacy:"隐私政策", foot_refund:"退款政策",
  288. foot_made:"开源世界 · 算力普惠",
  289. chat_title:"帮助与支持", chat_online:"在线", chat_hello:"你好!有什么可以帮你?", chat_input:"输入消息...", chat_q_balance:"如何充值?", chat_q_key:"如何创建 API Key?", chat_q_model:"该选哪个模型?",
  290. auth_login_title:"登录", auth_register_title:"注册账号", auth_reset_title:"重置密码",
  291. auth_email:"邮箱", auth_password:"密码", auth_confirm:"确认密码", auth_new_pwd:"新密码", auth_confirm_new:"确认新密码",
  292. auth_code_label:"验证码", auth_code_send:"发送验证码", auth_code_resend:"重新发送 ({s}s)", auth_code_note:"验证码为 8 位大写字母和数字,15 分钟内有效",
  293. auth_code_sent:"✓ 验证码已发送至 {email},请在 15 分钟内输入。",
  294. auth_login_btn:"登录", auth_register_btn:"注册", auth_reset_btn:"重置密码",
  295. auth_forgot:"忘记密码?", auth_to_register:"注册账号", auth_to_login:"已有账号?去登录", auth_back_login:"返回登录",
  296. auth_err_pwd:"两次输入的密码不一致", auth_err_email:"邮箱格式不正确", auth_err_code:"验证码须为 8 位大写字母和数字",
  297. nav_home:"首页", nav_docs_ops:"操作文档", nav_console:"控制台",
  298. c_overview:"总览", c_keys:"API Keys", c_wallet:"充值", c_usage:"用量",
  299. c_welcome:"欢迎回来", c_balance:"余额", c_today_req:"今日请求", c_today_tokens:"今日 Token", c_active_keys:"活跃 API Key",
  300. c_usage_7d:"近 7 日用量", c_recent_tx:"最近交易", c_see_all:"查看详情 →",
  301. c_create_key:"+ 创建 API Key", c_key_name:"Key 名称", c_key_expire:"过期时间(可选)", c_key_create_btn:"+ 创建",
  302. c_key_once:"⚠️ Key 创建后仅显示一次,请立即保存。",
  303. c_t_name:"名称", c_t_key:"Key", c_t_status:"状态", c_t_last:"最近使用", c_t_created:"创建时间", c_t_action:"操作",
  304. c_rotate:"轮换", c_revoke:"撤销", c_reactivate:"重新激活", c_delete:"删除",
  305. c_security:"🔒 Key 以 SHA-256 哈希存储。轮换 = 撤销 + 新建。",
  306. c_avail:"可用余额", c_month_topup:"本月充值", c_select_amount:"选择充值金额", c_pay_method:"支付方式", c_topup_now:"立即充值",
  307. c_deposit_history:"充值历史", c_t_time:"时间", c_t_type:"类型", c_t_amount:"金额", c_t_ref:"参考",
  308. c_7days:"7 天", c_30days:"30 天", c_by_model:"按模型(7 天)", c_requests:"请求数", c_cost:"费用",
  309. c_total:"总览",
  310. c_sub_today:"较昨日", c_key_meta:"1 已撤销 · 1 即将过期", c_inout:"输入 3.1M · 输出 1.1M", c_req_unit:"次",
  311. c_st_active:"正常", c_st_expired:"已过期", c_st_revoked:"已撤销", c_st_success:"成功", c_tx_usage:"用量扣费", c_tx_deposit:"充值",
  312. c_this_month:"本月", c_topup_sub:"2 笔交易", c_tokens:"Token", c_usage_note:"单次请求明细见 GET /v1/usage(分页)。",
  313. q_limits:"用量限额", q_daily:"每日", q_total:"总量", q_req:"请求数", q_cost:"费用",
  314. q_alert_pct:"预警阈值", q_edit:"配置限额", q_save:"保存", q_unlimited:"不限",
  315. q_progress:"已用", q_blocked:"已超限", q_warning:"接近限额",
  316. q_banner:"用量提醒", q_banner_80:"已达到每日限额的 80%,请注意控制用量。",
  317. q_banner_100:"已超出限额,请求将被拒绝(429)。",
  318. q_quota_manage:"限额管理", q_over:"超限", q_ok:"正常", q_events:"限额事件",
  319. models_ph:"搜索模型...", filter_all:"全部", filter_flagship:"旗舰", filter_value:"性价比", filter_reasoning:"深度推理", filter_enterprise:"企业级",
  320. m_col_model:"模型", m_col_vendor:"供应商", m_col_ctx:"上下文", m_col_in:"输入", m_col_out:"输出", m_col_action:"",
  321. m_glm_name:"GLM 5.2", m_glm_vendor:"智谱 AI", m_glm_ctx:"128K", m_glm_short:"旗舰多模态模型。推理、编程与智能体任务。",
  322. m_dsv4_name:"DeepSeek V4", m_dsv4_vendor:"DeepSeek", m_dsv4_ctx:"1M", m_dsv4_short:"开源推理引擎。适合高并发对话与 RAG 管线。",
  323. m_dsv4p_name:"DeepSeek V4 Pro", m_dsv4p_vendor:"DeepSeek", m_dsv4p_ctx:"1M", m_dsv4p_short:"深度推理模式,擅长复杂数学、逻辑与长程规划。",
  324. m_qwen_name:"Qwen Max", m_qwen_vendor:"阿里云", m_qwen_ctx:"256K", m_qwen_short:"阿里最强通用模型。多语言与工具调用就绪。",
  325. m_see_detail:"查看详情 →", m_ctx_tokens:"tokens",
  326. tag_flagship:"旗舰", tag_best:"性价比之王", tag_reasoning:"深度推理", tag_enterprise:"企业级",
  327. models_count:"个模型可用",
  328. detail_bread:"模型", detail_overview:"概览",
  329. detail_use_btn:"开始使用此模型",
  330. detail_spec:"技术规格", detail_spec_vendor:"供应商", detail_spec_ctx:"上下文长度", detail_spec_out:"最大输出", detail_spec_base:"BASE URL", detail_spec_rate:"限流",
  331. detail_cap:"能力", detail_cap_json:"JSON 输出", detail_cap_tool:"工具调用", detail_cap_stream:"流式输出 (SSE)", detail_cap_think:"思考模式",
  332. detail_pricing:"价格", detail_pricing_note:"每 1M tokens · 已含国内价 7 折",
  333. detail_price_in:"输入", detail_price_out:"输出",
  334. detail_code:"API 示例", detail_code_tab_curl:"cURL", detail_code_tab_py:"Python SDK",
  335. detail_rel:"相关模型", detail_rel_view:"查看全部模型 →",
  336. detail_billing:"扣费规则", detail_billing_p:"费用 = token 消耗 × 单价,从预充值余额直接扣除。价格可能变动,请以本页最新信息为准。",
  337. spec_ok:"支持", spec_no:"不支持",
  338. price_h1:"定价", price_sub:"所有价格 = 国内价 7 折。以美元与越南盾按当前汇率显示。",
  339. price_th_model:"模型", price_th_in:"输入 / 1M", price_th_out:"输出 / 1M", price_th_save:"节省",
  340. price_rule:"扣费规则", price_rule_p:"费用 = token × 单价,从余额扣除。无订阅、无承诺。越南盾按充值时刻汇率结算。",
  341. price_faq:"价格常见问题", price_note:"* 价格为占位值,待百炼 × 0.7 确认。",
  342. docs_h1:"文档", docs_sub:"快速开始、API 参考与计费规则。",
  343. docs_sidebar_start:"快速开始", docs_sidebar_api:"API 参考", docs_sidebar_errors:"错误码", docs_sidebar_billing:"计费",
  344. docs_start_h:"快速开始", docs_start_p:"三步调用你的第一个模型。",
  345. docs_start_s1:"创建账号并充值", docs_start_s2:"创建 API Key(dt_ 前缀)", docs_start_s3:"调用 OpenAI 兼容 API",
  346. docs_api_h:"API 参考", docs_api_endpoint:"端点", docs_api_models:"模型列表", docs_api_models_p:"GET /v1/models — 无需认证。",
  347. docs_api_chat:"Chat Completions", docs_api_chat_p:"POST /v1/chat/completions — Bearer API Key 认证,支持 SSE 流式。",
  348. docs_err_h:"错误码", docs_err_401:"API Key 无效", docs_err_402:"余额不足", docs_err_404:"模型不存在", docs_err_429:"超过限流",
  349. docs_bill_h:"计费", docs_bill_p:"费用 = token × 单价(美元),按充值时刻汇率换算越南盾。控制台可查完整交易记录。",
  350. code_copy:"复制"
  351. },
  352. /* ═══════════ 繁体中文 ═══════════ */
  353. "zh-TW": {
  354. nav_models:"模型", nav_pricing:"定價", nav_docs:"文件", nav_login:"登入", nav_signup:"立即開始",
  355. crumb_home:"首頁",
  356. hero_badge:"OpenAI 相容 · 中國國內價 7 折 · 越南優先",
  357. hero_h1:"一點觸達", hero_h1_grad:"所有 AI。",
  358. hero_sub:"DoTouch.AI 將中國前沿大模型——GLM 5.2、DeepSeek V4 等——以難以置信的低價帶給全球開發者與中小企業。同樣的 OpenAI API,便宜 30%,零遷移成本。",
  359. hero_cta1:"免費開始", hero_cta2:"查看定價",
  360. stat_models:"4+", stat_models_l:"前沿模型", stat_save:"30%", stat_save_l:"低於中國國內價格",
  361. stat_api:"100%", stat_api_l:"OpenAI API 相容", stat_pay:"6+", stat_pay_l:"支付方式",
  362. models_kicker:"模型", models_h2:"中國前沿模型,一個 API",
  363. models_p:"所有模型經由阿里雲百煉提供服務,完全相容 OpenAI 格式。可查看每個模型的詳細資訊。",
  364. model_link:"詳情",
  365. price_in:"輸入", price_out:"輸出",
  366. pricing_kicker:"定價", pricing_h2:"按用量付費",
  367. pricing_p:"預儲值,按 token 計量。無訂閱——隨時儲值。價格 = 中國國內價 7 折,以美元與越南盾雙幣種顯示。",
  368. pt_model:"模型", pt_in:"輸入 / 1M tokens", pt_out:"輸出 / 1M tokens", pt_save:"節省",
  369. pricing_more:"查看完整定價 →",
  370. feat_kicker:"為什麼選擇 DoTouch", feat_h2:"為開發者而生,人人用得起",
  371. f1_t:"無縫相容 OpenAI", f1_d:"改一行 OpenAI SDK 設定即可使用。",
  372. f2_t:"中國國內價 7 折", f2_d:"中國模型、中國價格,美元或越南盾支付。",
  373. f3_t:"本地化支付", f3_d:"MoMo、ZaloPay、Stripe、PayPal、Alipay 與銀行卡。",
  374. f4_t:"越南優先支援", f4_d:"越南語控制台、文件與客服。",
  375. f5_t:"低延遲高可用", f5_d:"香港邊緣節點直連上游容量。",
  376. f6_t:"用量透明", f6_d:"每次請求的 token 與費用記錄、按日彙總。",
  377. pay_kicker:"支付", pay_h2:"按你的方式付款", pay_card:"銀行卡",
  378. how_kicker:"快速開始", how_h2:"三步上線",
  379. s1_t:"建立帳號", s1_d:"信箱註冊,任意金額儲值。",
  380. s2_t:"產生 API Key", s2_d:"控制台一鍵產生,dt_ 前綴。",
  381. s3_t:"呼叫 API", s3_d:"把 OpenAI SDK 指向 api.dotouch.ai,完成。",
  382. faq_kicker:"常見問題", faq_h2:"常見問題解答",
  383. q1:"計費方式是什麼?", a1:"僅預儲值。儲值後每次請求按 token 計量並從餘額扣除。無訂閱、無意外帳單。",
  384. q2:"真的相容 OpenAI 嗎?", a2:"是的。相同的端點、請求結構、串流(SSE)與錯誤格式。現有 OpenAI SDK 只需更換 base URL。",
  385. q3:"支援哪些幣種?", a3:"支援美元與越南盾顯示。支付支援 MoMo、ZaloPay、Stripe、PayPal、Alipay 與銀行卡,按儲值時的匯率結算。",
  386. q4:"有哪些模型?", a4:"GLM 5.2、DeepSeek V4、DeepSeek V4 Pro、Qwen Max——更多模型持續上架中。",
  387. q5:"有最低儲值限制嗎?", a5:"沒有。任意金額起步——哪怕 $1。",
  388. q6:"我的資料安全嗎?", a6:"你的 API 呼叫經由阿里雲百煉處理並遵守適用條款。我們絕不用你的資料訓練模型。",
  389. cta_h2:"一點觸達。所有 AI。省 30%。", cta_p:"加入越南及全球開發者的 DoTouch.AI 社群。", cta_btn:"免費建立帳號",
  390. rate_note:"參考匯率:1 USD ≈ ¥7.20(儲值時刻自動更新)",
  391. foot_p:"為全球開發者與中小企業提供平價中國前沿 AI。",
  392. foot_product:"產品", foot_console:"控制台", foot_status:"狀態", foot_dev:"開發者",
  393. foot_docs:"文件", foot_quickstart:"快速開始", foot_support:"支援", foot_legal:"法律",
  394. foot_tos:"服務條款", foot_privacy:"隱私政策", foot_refund:"退款政策",
  395. foot_made:"開源世界 · 算力普惠",
  396. chat_title:"幫助與支援", chat_online:"線上", chat_hello:"你好!有什麼可以幫你?", chat_input:"輸入訊息...", chat_q_balance:"如何儲值?", chat_q_key:"如何建立 API Key?", chat_q_model:"該選哪個模型?",
  397. auth_login_title:"登入", auth_register_title:"註冊帳號", auth_reset_title:"重設密碼",
  398. auth_email:"信箱", auth_password:"密碼", auth_confirm:"確認密碼", auth_new_pwd:"新密碼", auth_confirm_new:"確認新密碼",
  399. auth_code_label:"驗證碼", auth_code_send:"發送驗證碼", auth_code_resend:"重新發送 ({s}s)", auth_code_note:"驗證碼為 8 位大寫字母和數字,15 分鐘內有效",
  400. auth_code_sent:"✓ 驗證碼已發送至 {email},請在 15 分鐘內輸入。",
  401. auth_login_btn:"登入", auth_register_btn:"註冊", auth_reset_btn:"重設密碼",
  402. auth_forgot:"忘記密碼?", auth_to_register:"註冊帳號", auth_to_login:"已有帳號?去登入", auth_back_login:"返回登入",
  403. auth_err_pwd:"兩次輸入的密碼不一致", auth_err_email:"信箱格式不正確", auth_err_code:"驗證碼須為 8 位大寫字母和數字",
  404. nav_home:"首頁", nav_docs_ops:"操作文件", nav_console:"控制台",
  405. c_overview:"總覽", c_keys:"API Keys", c_wallet:"儲值", c_usage:"用量",
  406. c_welcome:"歡迎回來", c_balance:"餘額", c_today_req:"今日請求", c_today_tokens:"今日 Token", c_active_keys:"活躍 API Key",
  407. c_usage_7d:"近 7 日用量", c_recent_tx:"最近交易", c_see_all:"查看詳情 →",
  408. c_create_key:"+ 建立 API Key", c_key_name:"Key 名稱", c_key_expire:"過期時間(可選)", c_key_create_btn:"+ 建立",
  409. c_key_once:"⚠️ Key 建立後僅顯示一次,請立即儲存。",
  410. c_t_name:"名稱", c_t_key:"Key", c_t_status:"狀態", c_t_last:"最近使用", c_t_created:"建立時間", c_t_action:"操作",
  411. c_rotate:"輪換", c_revoke:"撤銷", c_reactivate:"重新啟用", c_delete:"刪除",
  412. c_security:"🔒 Key 以 SHA-256 雜湊儲存。輪換 = 撤銷 + 新建。",
  413. c_avail:"可用餘額", c_month_topup:"本月儲值", c_select_amount:"選擇儲值金額", c_pay_method:"支付方式", c_topup_now:"立即儲值",
  414. c_deposit_history:"儲值歷史", c_t_time:"時間", c_t_type:"類型", c_t_amount:"金額", c_t_ref:"參考",
  415. c_7days:"7 天", c_30days:"30 天", c_by_model:"按模型(7 天)", c_requests:"請求數", c_cost:"費用",
  416. c_total:"總覽",
  417. c_sub_today:"較昨日", c_key_meta:"1 已撤銷 · 1 即將過期", c_inout:"輸入 3.1M · 輸出 1.1M", c_req_unit:"次",
  418. c_st_active:"正常", c_st_expired:"已過期", c_st_revoked:"已撤銷", c_st_success:"成功", c_tx_usage:"用量扣費", c_tx_deposit:"儲值",
  419. c_this_month:"本月", c_topup_sub:"2 筆交易", c_tokens:"Token", c_usage_note:"單次請求明細見 GET /v1/usage(分頁)。",
  420. q_limits:"用量限額", q_daily:"每日", q_total:"總量", q_req:"請求數", q_cost:"費用",
  421. q_alert_pct:"預警閾值", q_edit:"設定限額", q_save:"儲存", q_unlimited:"不限",
  422. q_progress:"已用", q_blocked:"已超限", q_warning:"接近限額",
  423. q_banner:"用量提醒", q_banner_80:"已達到每日限額的 80%,請注意控制用量。",
  424. q_banner_100:"已超出限額,請求將被拒絕(429)。",
  425. q_quota_manage:"限額管理", q_over:"超限", q_ok:"正常", q_events:"限額事件",
  426. models_ph:"搜尋模型...", filter_all:"全部", filter_flagship:"旗艦", filter_value:"性價比", filter_reasoning:"深度推理", filter_enterprise:"企業級",
  427. m_col_model:"模型", m_col_vendor:"供應商", m_col_ctx:"上下文", m_col_in:"輸入", m_col_out:"輸出", m_col_action:"",
  428. m_glm_name:"GLM 5.2", m_glm_vendor:"智譜 AI", m_glm_ctx:"128K", m_glm_short:"旗艦多模態模型。推理、程式設計與智慧體任務。",
  429. m_dsv4_name:"DeepSeek V4", m_dsv4_vendor:"DeepSeek", m_dsv4_ctx:"1M", m_dsv4_short:"開源推理引擎。適合高並發對話與 RAG 管線。",
  430. m_dsv4p_name:"DeepSeek V4 Pro", m_dsv4p_vendor:"DeepSeek", m_dsv4p_ctx:"1M", m_dsv4p_short:"深度推理模式,擅長複雜數學、邏輯與長程規劃。",
  431. m_qwen_name:"Qwen Max", m_qwen_vendor:"阿里雲", m_qwen_ctx:"256K", m_qwen_short:"阿里最強通用模型。多語言與工具呼叫就緒。",
  432. m_see_detail:"查看詳情 →", m_ctx_tokens:"tokens",
  433. tag_flagship:"旗艦", tag_best:"性價比之王", tag_reasoning:"深度推理", tag_enterprise:"企業級",
  434. models_count:"個模型可用",
  435. detail_bread:"模型", detail_overview:"概覽",
  436. detail_use_btn:"開始使用此模型",
  437. detail_spec:"技術規格", detail_spec_vendor:"供應商", detail_spec_ctx:"上下文長度", detail_spec_out:"最大輸出", detail_spec_base:"BASE URL", detail_spec_rate:"限流",
  438. detail_cap:"能力", detail_cap_json:"JSON 輸出", detail_cap_tool:"工具呼叫", detail_cap_stream:"串流輸出 (SSE)", detail_cap_think:"思考模式",
  439. detail_pricing:"價格", detail_pricing_note:"每 1M tokens · 已含中國國內價 7 折",
  440. detail_price_in:"輸入", detail_price_out:"輸出",
  441. detail_code:"API 範例", detail_code_tab_curl:"cURL", detail_code_tab_py:"Python SDK",
  442. detail_rel:"相關模型", detail_rel_view:"查看全部模型 →",
  443. detail_billing:"扣費規則", detail_billing_p:"費用 = token 消耗 × 單價,從預儲值餘額直接扣除。價格可能變動,請以本頁最新資訊為準。",
  444. spec_ok:"支援", spec_no:"不支援",
  445. price_h1:"定價", price_sub:"所有價格 = 中國國內價 7 折。以美元與越南盾按當前匯率顯示。",
  446. price_th_model:"模型", price_th_in:"輸入 / 1M", price_th_out:"輸出 / 1M", price_th_save:"節省",
  447. price_rule:"扣費規則", price_rule_p:"費用 = token × 單價,從餘額扣除。無訂閱、無承諾。越南盾按儲值時刻匯率結算。",
  448. price_faq:"價格常見問題", price_note:"* 價格為佔位值,待百煉 × 0.7 確認。",
  449. docs_h1:"文件", docs_sub:"快速開始、API 參考與計費規則。",
  450. docs_sidebar_start:"快速開始", docs_sidebar_api:"API 參考", docs_sidebar_errors:"錯誤碼", docs_sidebar_billing:"計費",
  451. docs_start_h:"快速開始", docs_start_p:"三步呼叫你的第一個模型。",
  452. docs_start_s1:"建立帳號並儲值", docs_start_s2:"建立 API Key(dt_ 前綴)", docs_start_s3:"呼叫 OpenAI 相容 API",
  453. docs_api_h:"API 參考", docs_api_endpoint:"端點", docs_api_models:"模型列表", docs_api_models_p:"GET /v1/models — 無需認證。",
  454. docs_api_chat:"Chat Completions", docs_api_chat_p:"POST /v1/chat/completions — Bearer API Key 認證,支援 SSE 串流。",
  455. docs_err_h:"錯誤碼", docs_err_401:"API Key 無效", docs_err_402:"餘額不足", docs_err_404:"模型不存在", docs_err_429:"超過限流",
  456. docs_bill_h:"計費", docs_bill_p:"費用 = token × 單價(美元),按儲值時刻匯率換算越南盾。控制台可查完整交易記錄。",
  457. code_copy:"複製"
  458. }
  459. };
  460. /* ── 切换器:默认 vi ── */
  461. function setLang(lang) {
  462. const dict = I18N[lang];
  463. document.querySelectorAll('[data-i18n]').forEach(el => {
  464. const key = el.dataset.i18n;
  465. if (dict && dict[key] !== undefined) el.textContent = dict[key];
  466. });
  467. document.querySelectorAll('.lang-btn').forEach(b => b.classList.toggle('active', b.dataset.lang === lang));
  468. if (document.documentElement) document.documentElement.lang = lang;
  469. applyCurrency();
  470. try { localStorage.setItem('dotouch_lang', lang); } catch(e){}
  471. }
  472. (function init() {
  473. let saved = 'vi'; // 默认越南语
  474. try { saved = localStorage.getItem('dotouch_lang') || 'vi'; } catch(e){}
  475. document.querySelectorAll('.lang-btn').forEach(b => b.addEventListener('click', () => setLang(b.dataset.lang)));
  476. document.querySelectorAll('.faq-q').forEach(q => q.addEventListener('click', () => q.parentElement.classList.toggle('open')));
  477. const fab = document.getElementById('supportFab');
  478. const panel = document.getElementById('supportPanel');
  479. if (fab && panel) fab.addEventListener('click', () => panel.classList.toggle('open'));
  480. setLang(saved);
  481. /* 认证弹窗 */
  482. const modal = document.getElementById('authModal');
  483. if (modal) {
  484. const views = { login: document.getElementById('viewLogin'), register: document.getElementById('viewRegister'), reset: document.getElementById('viewReset') };
  485. window.showAuth = function (view) {
  486. Object.entries(views).forEach(([k, el]) => { if (el) el.hidden = k !== view; });
  487. modal.classList.add('open');
  488. document.body.style.overflow = 'hidden';
  489. };
  490. const closeAuth = () => { modal.classList.remove('open'); document.body.style.overflow = ''; };
  491. document.querySelectorAll('[data-open-auth]').forEach(b => b.addEventListener('click', () => showAuth(b.dataset.openAuth)));
  492. document.querySelectorAll('[data-auth-view]').forEach(a => a.addEventListener('click', () => showAuth(a.dataset.authView)));
  493. modal.querySelector('.modal-close')?.addEventListener('click', closeAuth);
  494. modal.addEventListener('click', e => { if (e.target === modal) closeAuth(); });
  495. /* 验证码 8 格输入:自动跳格 + 转大写 + 限制 A-Z0-9 */
  496. modal.querySelectorAll('.code-cell').forEach(cell => {
  497. cell.addEventListener('input', () => {
  498. cell.value = cell.value.toUpperCase().replace(/[^A-Z0-9]/g, '').slice(0, 1);
  499. if (cell.value) { const n = cell.nextElementSibling; if (n && n.classList.contains('code-cell')) n.focus(); }
  500. });
  501. cell.addEventListener('keydown', e => {
  502. if (e.key === 'Backspace' && !cell.value) { const p = cell.previousElementSibling; if (p && p.classList.contains('code-cell')) p.focus(); }
  503. });
  504. cell.addEventListener('paste', e => {
  505. e.preventDefault();
  506. const text = (e.clipboardData.getData('text') || '').toUpperCase().replace(/[^A-Z0-9]/g, '').slice(0, 8);
  507. const cells = modal.querySelectorAll('.code-cell');
  508. [...text].forEach((ch, i) => { if (cells[i]) cells[i].value = ch; });
  509. if (cells[text.length]) cells[text.length].focus();
  510. });
  511. });
  512. /* 发送验证码:提示 15 分钟有效 + 60 秒重发倒计时 */
  513. modal.querySelectorAll('[data-send-code]').forEach(btn => {
  514. btn.addEventListener('click', () => {
  515. const row = btn.closest('.code-row');
  516. const emailInput = row.parentElement.querySelector('input[type="email"]');
  517. const note = row.parentElement.querySelector('.auth-note[data-code-note]');
  518. const email = emailInput ? emailInput.value.trim() : '';
  519. const dict = I18N[document.documentElement.lang] || I18N.en;
  520. if (note) {
  521. if (!email) { note.textContent = dict.auth_err_email; note.className = 'auth-note err'; return; }
  522. note.textContent = dict.auth_code_sent.replace('{email}', email);
  523. note.className = 'auth-note ok';
  524. }
  525. let s = 60;
  526. btn.disabled = true;
  527. const t = setInterval(() => {
  528. s--;
  529. btn.textContent = dict.auth_code_resend.replace('{s}', s);
  530. if (s <= 0) { clearInterval(t); btn.disabled = false; btn.textContent = dict.auth_code_send; }
  531. }, 1000);
  532. });
  533. });
  534. }
  535. })();