配置TCDN中不同语言分配的子域名

您可以自己指定TCDN中,不同的语言使用自己定义的子域名来提供访问。
比如:
简体中文访问为 zh-cn.xxxx.com
英语访问为 en.xxxx.com
要做到这样访问,你需要设置设置 源站-子域名 这里为“缩短”

也就是 源站-子域名 这里,不设置或者设置为“常规”时,英语访问为 english.xxxx.com, 当设置为“缩短” 后,英语访问为 en.xxxx.com

另外这个缩短的域名,你也可以自行进行改动,比如你的英语访问想改为 yingyu.xxxx.com
步骤为,你需要在你tcdn服务器上,新建一个文件 ,文件为

  1. /mnt/tcdn/language.json

文件内容为:

  1. {"zh-cn":"chinese_simplified","zh-tw":"chinese_traditional","co":"corsican","gn":"guarani","rw":"kinyarwanda","ha":"hausa","no":"norwegian","nl":"dutch","yo":"yoruba","en":"english","kok":"gongen","la":"latin","ne":"nepali","fr":"french","cs":"czech","haw":"hawaiian","ka":"georgian","ru":"russian","fa":"persian","bho":"bhojpuri","hi":"hindi","be":"belarusian","sw":"swahili","is":"icelandic","yi":"yiddish","tw":"twi","ga":"irish","gu":"gujarati","km":"khmer","sk":"slovak","he":"hebrew","kn":"kannada","hu":"hungarian","ta":"tamil","ar":"arabic","bn":"bengali","az":"azerbaijani","sm":"samoan","af":"afrikaans","id":"indonesian","da":"danish","sn":"shona","bm":"bambara","lt":"lithuanian","vi":"vietnamese","mt":"maltese","tk":"turkmen","as":"assamese","ca":"catalan","si":"singapore","ceb":"cebuano","gd":"scottish-gaelic","sa":"sanskrit","pl":"polish","gl":"galician","lv":"latvian","uk":"ukrainian","tt":"tatar","cy":"welsh","ja":"japanese","fil":"filipino","ay":"aymara","lo":"lao","te":"telugu","ro":"romanian","ht":"haitian_creole","doi":"dogrid","sv":"swedish","mai":"maithili","th":"thai","hy":"armenian","my":"burmese","ps":"pashto","hmn":"hmong","dv":"dhivehi","lb":"luxembourgish","sd":"sindhi","ku":"kurdish","tr":"turkish","mk":"macedonian","bg":"bulgarian","ms":"malay","lg":"luganda","mr":"marathi","et":"estonian","ml":"malayalam","de":"deutsch","sl":"slovene","ur":"urdu","pt":"portuguese","ig":"igbo","ckb":"kurdish_sorani","om":"oromo","el":"greek","es":"spanish","fy":"frisian","so":"somali","am":"amharic","ny":"nyanja","pa":"punjabi","eu":"basque","it":"italian","sq":"albanian","ko":"korean","tg":"tajik","fi":"finnish","ky":"kyrgyz","ee":"ewe","hr":"croatian","kri":"creole","qu":"quechua","bs":"bosnian","mi":"maori"}

其中的key为要访问的子域名, value为 translate.js 的语言标识。
你可以改动这个文件中key的内容,改为你想要的值。但是一定不能改动value的值,value的值是固定的,要跟 translate.js 的语言标识对应的。