compare-i18n-keys.md 4.6 KB

Compare Page i18n Keys (ZH/EN)

File using these keys:

  • templates/xtu/cms/page_compare.html

Pattern used across the site:

  • cms_t('key', '中文默认文案')

How to maintain later

1. Add/modify compare parameter order or field source

Edit:

  • templates/xtu/cms/page_compare.html
  • Find: $compareFieldGroups = [...]

This section controls:

  • group order
  • parameter order
  • display label key
  • source field name / fallback field name

2. Add/modify category names shown in compare page

Edit CMS categories for product model modelid = 2; the compare page reads enabled category names dynamically by category ID.

3. Add new language translations

Add these keys into your language dictionary / translation storage used by cms_t(). If a key is missing, the page falls back to the Chinese default text.


Group keys

Key ZH default EN suggestion
compare_group_camera 相机 Camera
compare_group_general 通用 General
compare_group_display 显示屏 Display
compare_group_battery 电池 Battery
compare_group_connectivity 连接 Connectivity
compare_group_other_features 其他功能 Other Features

Label keys

Key ZH default EN suggestion
compare_label_category 所属分类 Category
compare_label_sale_status 上架状态 Availability
compare_label_size 尺寸 Dimensions
compare_label_waterproof 防水 Waterproofing
compare_label_microphone 麦克风 Microphone
compare_label_weight 重量 Weight
compare_label_connection_method 连接方式 Mounting Method
compare_label_color_version 颜色版本 Color Options
compare_label_vertical_shoot 原生竖拍 Native Vertical Shooting
compare_label_live_stream 直播功能 Live Streaming
compare_label_rear_screen 后置显示屏 Rear Screen
compare_label_front_screen 前置显示屏 Front Screen
compare_label_main_cpu 主控CPU Main CPU
compare_label_image_sensor 影像传感器 Image Sensor
compare_label_iso_range ISO范围 ISO Range
compare_label_e_shutter_speed 电子快门速度 Electronic Shutter Speed
compare_label_normal_video 普通录影 Standard Video
compare_label_hdr_video HDR录影 HDR Video
compare_label_night_mode 夜景模式 Night Mode
compare_label_slowmo_video 慢动作录影 Slow Motion Video
compare_label_raw_photo RAW拍照 RAW Photo
compare_label_time_lapse 延时摄影 Time Lapse
compare_label_pre_record_time 预录时长 Pre-record Duration
compare_label_horizon_level 地平线矫正 Horizon Leveling
compare_label_stabilization 防抖 Stabilization
compare_label_video_max_bitrate 视频储存最大码流 Max Video Bitrate
compare_label_file_system 支持文件系统 Supported File System
compare_label_image_format 图片格式 Image Format
compare_label_video_format 视频格式 Video Format
compare_label_sd_card_type 支持存储卡类型 Supported SD Card Type
compare_label_audio_record 音频录制 Audio Recording
compare_label_battery_type 类型 Type
compare_label_battery_cap 容量 Capacity
compare_label_battery_energy 能量 Energy
compare_label_battery_voltage 电压 Voltage
compare_label_work_temp 使用环境温度 Operating Temperature
compare_label_fast_charge 是否支持快充 Fast Charging
compare_label_charge_time 充电时间 Charging Time
compare_label_battery_life 续航时间 Battery Life
compare_label_wifi_freq Wi-Fi 工作频率 Wi-Fi Frequency
compare_label_wifi_proto Wi-Fi 协议 Wi-Fi Protocol
compare_label_bt_freq 蓝牙工作频率 Bluetooth Frequency
compare_label_bt_proto 蓝牙协议 Bluetooth Protocol
compare_label_bt_setup 蓝牙配网 Bluetooth Setup
compare_label_rev_charge 应急反向充电 Emergency Reverse Charging
compare_label_voice_ctrl 语音控制 Voice Control
compare_label_quick_record 快启(快启录像) Quick Start Recording

Suggested workflow later

When you add a new parameter:

  1. Add the field to model/table.
  2. Add the row definition inside $compareFieldGroups.
  3. Add one cms_t key in this list.
  4. Add translations for each active language.

When you add a new language:

  1. Keep page_compare.html unchanged.
  2. Add translations for the keys above in your language source.
  3. Test compare page in that language.