Skip to content

Customize Frontend Language


This document provides guidance on how to configure service settings to enable multilingual internationalization support for the frontend.

Configuration Steps

  1. In the frontend container front-webclient, configure the storage mapping path:
/config/cloudcare-forethought-webclient/lang.js -> lang.js
  1. Save the following content as the lang.js file.

  2. Modify the corresponding text based on the file format:

  3. To customize the text content, replace the corresponding key value.
  4. If a key does not need to be modified, you can delete it directly.
  5. Note: key values are fixed and cannot be modified.

Configuration Example

Below is the content template of the lang.js file:

window.GC_GLOBAL_LOCAL = {
  // English configuration
  en: {
    'left_menu.scene.create_dashboard': 'test',
  },

  // Simplified Chinese configuration
  'zh-CN': {
    // Scenes
    'left_menu.scene.label': 'Scenes',
    'left_menu.scene.dashboard': 'Dashboards',
    'left_menu.scene.create_dashboard': 'Create Dashboard',
    'left_menu.scene.service_manage': 'Service Management',
    'left_menu.scene.regular_report': 'Scheduled Reports',
    'left_menu.scene.note': 'Notes',
    'left_menu.scene.create_note': 'Create Note',
    'g.viewers': 'Explorers',
    'left_menu.scene.built_in_view': 'Built-in Views',

    // Events
    'left_menu.event.label': 'Events',
    'left_menu.event.smart_monitor': 'Intelligent Monitoring',
    'left_menu.common.help_doc': 'Help Documentation',

    // Incidents
    'left_menu.exception_tracking.label': 'Incidents',
    'g.analysis_dashboard': 'Analysis Dashboard',
    'exceptions.schedule': 'Schedule',
    'left_menu.exception_tracking.conf': 'Configuration Management',

    // Infrastructure
    'left_menu.object_admin.label': 'Infrastructure',
    'left_menu.object_admin.host': 'Hosts',
    'left_menu.object_admin.host_topology': 'Host Hexagon Map',
    'left_menu.object_admin.docker_containers': 'Containers',
    'left_menu.object_admin.host_processes': 'Processes',
    'left_menu.object_admin.network': 'Network',
    'left_menu.object_admin.others': 'Unified Catalog',
    'g.custom_object': 'Unified Catalog',
    'r.object_others': 'Unified Catalog',
    'left_menu.manage.pipeline': 'Pipelines',

    // Metrics
    'left_menu.metric.label': 'Metrics',
    'left_menu.metric.metric_analysis': 'Metrics Analysis',
    'left_menu.metric.metric_map': 'Metrics Management',
    'r.log_query_rule_list': 'Data Access',

    // Logs
    'left_menu.log.label': 'Logs',
    'left_menu.log.error_track': 'Error Tracking',
    'left_menu.common.indicator': 'Generate Metrics',
    'left_menu.log.log_index': 'Indexes',
    'left_menu.log.black_list': 'Blacklist',
    'left_menu.log.backup_log': 'Data Forwarding',
    'left_menu.log.query_rule': 'Data Access',

    // APM
    'left_menu.apm.label': 'APM',
    'left_menu.apm.service': 'Services',
    'left_menu.apm.add_service': 'Add Service',
    'left_menu.apm.service_topology': 'Service Map',
    'left_menu.common.overview': 'Overview',
    'left_menu.apm.link': 'Traces',
    'left_menu.apm.error_track': 'Error Tracking',
    'r.profile': 'Profiling',

    // Cloud Billing
    'left_menu.cloudbilling.label': 'Cloud Billing',
    'left_menu.cloudbilling.overview': 'Overview',

    // RUM
    'left_menu.rum.label': 'RUM',
    'left_menu.rum.rum_list': 'Applications',
    'g.analysis_dashboard': 'Analysis Dashboard',
    'rum.heatmap': 'Heatmap',
    'rum.tracking': 'Traces',
    'left_menu.integration.rum_headless': 'RUM Headless',

    // Synthetic Monitoring
    'left_menu.cloud_dial.label': 'Synthetic Monitoring',
    'left_menu.cloud_dial.task': 'Tasks',
    'left_menu.cloud_dial.self_node_manage': 'Self-hosted Node Management',

    // Security Check
    'left_menu.security.label': 'Security Check',

    // CI Visibility
    'r.ci': 'CI Visibility',

    // Monitoring
    'left_menu.monitor.label': 'Monitoring',
    'left_menu.monitor.checker': 'Monitors',
    'left_menu.monitor.smart_checker': 'Intelligent Monitoring',
    'left_menu.monitor.intelligent_inspection': 'Intelligent Inspection',
    'r.slo_list': 'SLOs',
    'left_menu.monitor.silence_manage': 'Mute Management',
    'left_menu.monitor.alert_policy_manage': 'Alert Policy Management',
    'left_menu.monitor.notification_manage': 'Notification Targets',

    // Integrations
    'left_menu.integration.label': 'Integrations',
    'r.datakit': 'Datakit',
    'left_menu.integration.func_expand': 'Extensions',
    'left_menu.integration.external_data_source': 'External Data Sources',
    'r.dca': 'DCA',
    'left_menu.integration.mobile': 'Mobile',

    // Management
    'left_menu.manage.label': 'Management',
    'left_menu.manage.system_settings': 'System Settings',
    'left_menu.manage.settings': 'Workspace Settings',
    'left_menu.manage.user_settings': 'User Settings',
    'left_menu.manage.workspace_attr': 'Attribute Claims',
    'left_menu.manage.field_manage': 'Field Management',
    'left_menu.manage.tag_list': 'Global Tags',
    'left_menu.manage.env_list': 'Environment Variables',
    'left_menu.manage.access_authentication': 'Access Authentication',
    'left_menu.manage.members_manage': 'Member Management',
    'left_menu.manage.roles_manage': 'Role Management',
    'left_menu.manage.api_key_manage': 'API Key Management',
    'left_menu.manage.client_token_manage': 'Client Token Management',
    'left_menu.manage.invite_list': 'Invitation Records',
    'left_menu.manage.data_operate': 'Data Processing',
    'left_menu.manage.black_list': 'Blacklist',
    'left_menu.manage.regexp': 'Regular Expressions',
    'left_menu.manage.audit': 'Security & Audit',
    'left_menu.manage.cloud_account_manage': 'Cloud Account Management',
    'h.action_audit': 'Audit Events',
    'left_menu.manage.share_manage': 'Share Management',
    'left_menu.manage.cross_namespace_auth': 'Cross-Workspace Authorization',
    'left_menu.manage.data_compliance': 'Data Compliance',
    'left_menu.manage.sensitive_data_desensitization': 'Sensitive Data Masking',
    'r.sensitive_data': 'Sensitive Data Scanning',

    // Usage Statistics
    'left_menu.billing.label': 'Usage Statistics',
  },
}

If further extension or optimization is needed, feel free to add content or adjust the format!

Feedback

Is this page helpful?