Quantcast
Viewing all articles
Browse latest Browse all 229904

Anyone tried the Translate service?

As you see, language files are JSON files which means you can work around with object (that's why your lang file starts with { and ends with }) and sub objects

About best practice and keys in json files, I don't know, but I've seen two version (we're mainly using 1st one):

en.json
{
"NEWS": "News",
"NEWS_NO_DATA": "No data for News page",
"NEWS_FETCHING": "Fetching news from server..."

"ABOUT": "About",
"ABOUT_LICENCE_AGREEMENT": "I'm kidding",
"ABOUT_EMAIL": "..."
}

or option 2:

en.json
{
"NEWS": {
"TITLE: "News",
"NO_DATA": "No data for News page",
"FETCHING": "Fetching news from server..."
},

"ABOUT": {
"TITLE: "About",
"LICENCE_AGREEMENT": "I'm kidding",
"EMAIL": "..."
}
}


Viewing all articles
Browse latest Browse all 229904

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>