Framework Supplementary Documentation

Framework, Design Ideas, and Documentation

ShipLang multilingual dropdown

The list of multilingual languages ​​is stored in a variable named [$qx_lang] in the root directory [index.php].

In [English|1], |1 represents displaying the language, and |0 represents the language existing but not displayed.

Multilingual dropdowns load automatically; detailed design features are available in the general prompts.

Additional prompts

I. JavaScript Writing Standards

Disable jQuery, arrow function abbreviations, and self-executing functions.

II. Multilingual Translation

2.3 Dynamic text translation tags (use with caution)

<span id="g">测试</span>
<div style="display:none"><!-- 隐藏翻译字典 -->
  <span data-i18n="哈喽">hello</span>
  <span data-i18n="不错">good</span>
</div>
<script>
  // JS里写中文,系统自动查字典翻译
  alert('哈喽'); // 自动读取翻译为 hello
  document.getElementById('g').textContent = '不错'; // 自动替换成 good
</script>
⚠️ Note:Only do this when you absolutely need to dynamically display the data using JavaScript; use JavaScript as little as possible when it's not necessary.

2.4 Multilingual page redirection (current language must be maintained)

<!-- HTML 跳转,系统自动处理,直接写相对路径即可 -->
<a href="/home" data-i18n="h">首页</a>
<!-- 当前中文页 → /zh/home -->
<!-- 当前英文页 → /en/home -->
// JS 跳转,需手动拼接语言代码
window.location.href = '/' + document.documentElement.lang + '/about';
// 当前中文页 → /zh/about
// 当前英文页 → /en/about

III. Payment and Login

Login and payment are optional features; they should only be integrated if explicitly requested by the user. Users need to specify the conditions under which login and payment should be displayed and what triggers them. If the description is incomplete, users can choose not to add them at this time.

window.Login_ShipLang();   // 拉起登录

window.OpenPay_ShipLang(); // 拉起支付

if (window.IsPay_ShipLang()) {
    // 是会员
} else {
    // 非会员
}

IV. Visual Design Guidelines