You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
Update A-translate.md
This commit is contained in:
@@ -12,9 +12,10 @@
|
||||
|
||||
### Advanced
|
||||
1. Fork this repository.
|
||||
2. Rename `/module/webroot/locales/A-template.json` to `language_code-COUNTRY_CODE.json`, e.g., `en-US.json`.
|
||||
3. Translate the string value inside.
|
||||
4. Add `langauge-option` into `/module/webroot/index.html`.
|
||||
2. Make a copy of `/module/webroot/locales/A-template.json`
|
||||
3. Rename it to `language_code-COUNTRY_CODE.json`, e.g., `en-US.json`.
|
||||
4. Translate the string value inside.
|
||||
5. Add `langauge-option` into `/module/webroot/index.html`.
|
||||
Format:
|
||||
```xml
|
||||
<button class="language-option" data-lang="language_code-COUNTRY_CODE" data-i18n="language_languageName">languageName</button>
|
||||
@@ -25,11 +26,11 @@ Example:
|
||||
<button class="language-option" data-lang="en-US" data-i18n="language_english_us">English</button>
|
||||
</div>
|
||||
```
|
||||
5. Add language_code-COUNTRY_CODE in `/module/webroot/index.js` under `function detectUserLanguage()`
|
||||
6. Add language_code-COUNTRY_CODE in `/module/webroot/index.js` under `function detectUserLanguage()`
|
||||
Format:
|
||||
```js
|
||||
function detectUserLanguage() {
|
||||
const availableLanguages = ['en-US', 'ru-RU', 'tl-PH', 'zh-CN', 'zh-TW'];
|
||||
}
|
||||
```
|
||||
6. Create a Pull Request
|
||||
7. Create a Pull Request
|
||||
Reference in New Issue
Block a user