feat: Added Simplified Chinese translation#590
Conversation
24c09ab to
5011256
Compare
|
Lots of fpushs, sorry… |
|
|
||
| // localization | ||
| import lang 'imports/lang/en.nss' | ||
| import lang 'imports/lang/zh.nss' |
There was a problem hiding this comment.
Only a single localization file should be imported. In case of multiple ones, the one appearing later (zh in this case) is imported. This is not the desired behavior. The choice should be left up to the user.
There was a problem hiding this comment.
Eh, I thought it depends on the system language... Shouldn't it?
There was a problem hiding this comment.
There are no translation instructions yet. So I can't say for sure how is it going to be implemented. Maybe through setup? or maybe user will have to manually change it through shell.nss.
There was a problem hiding this comment.
wait for our boss's answer then❤️
There was a problem hiding this comment.
Only one file must be imported
Use these functions to find the language name or identifier.
sys.lang.id // 1033
sys.lang.name // en
sys.lang.country // US
sys.lang // en-USExample of loading the language file according to the system language.
If the file does not exist, the default language file in English will be loaded.
$loc_path='imports\lang\'
import lang if(path.exists(loc_path + sys.lang + ".nss"),
loc_path + sys.lang + ".nss",
loc_path + "\\en.nss")| item(title=loc.system image=inherit cmd='ms-settings:') | ||
| item(title=loc.about image=inherit cmd='ms-settings:about') | ||
| item(title=loc.your_info image=inherit cmd='ms-settings:yourinfo') | ||
| item(title=loc.system_info image=inherit cmd-line='/K systeminfo') | ||
| item(title=loc.search cmd='search-ms:' image=inherit) | ||
| item(title=loc.usb image=inherit cmd='ms-settings:usb') | ||
| item(title=loc.windows_update image=inherit cmd='ms-settings:windowsupdate') | ||
| item(title=loc.windows_defender image=inherit cmd='ms-settings:windowsdefender') | ||
| menu(title=loc.apps image=inherit) |
There was a problem hiding this comment.
Not sure about localizing these titles just yet (and other similar ones you added). Because Arabic and Korean files don't have these defined and there is no default value for them.
There was a problem hiding this comment.
I thought when these titles don't exist, will fall back to English.....
No description provided.