You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to make a calculate function to fit the contents when loading the texts on the landing page
The different language is appearing different length with the characters.
Thus, every translation needs to calculate by individually.
add language parameter to the URL
e.g. https://playproject-io.github.io/?lang=<value> where <value> can be en or de or zh or zh-tw? ...etc...
constparams=newURL(location.href).searchParamsconstlang=params.get('lang')console.log(lang)// e.g. => "en";(asyncfilepath=>{constjson=awaitfetch(filepath).then(response=>response.text())console.log(json)})(newURL(`data.${lang}.json`,location.href).href)// make english default// => remove param if it's englishconstparams=newURL(location.href).searchParamsif(params.get('lang')==='en'){params.delete('lang')location.search=params}
The text was updated successfully, but these errors were encountered:
@todo
e.g.
https://playproject-io.github.io/?lang=<value>
where<value>
can been
orde
orzh
orzh-tw
? ...etc...The text was updated successfully, but these errors were encountered: