This repo contains official Svelte and SvelteKit sites localized to russian.
If you looking for russian content(documentation, tutorial, examples etc.) for theese sites, you should go to sveltejs-translations/content-server repo of the unofficial multilangual content server.
The content of the official sites repo is downloading to the temporary directory, then all needed files will be replaced or patched according patch directory content. So whenever official sites have some changes we can rebuild russian ones quickly.
- Run
npm install - Run
npm run dev:svelteornpm run dev:kitto start development site of needed project - Edit or add any files in
patchdirectory or strings inpatch/strings.jsonfile and site will be reloaded with new translation
Change and PR only the files in
patchdirectory
To start developing your own localized site:
- Clone this repo.
- Then remove all files from
patchdirectory, exceptstrings.json. - Replace russian strings by your own in
strings.json - If you need replace whole files, place it inside
patchdirectory, respect relative path of original file. - Run
npm run build:svelteornpm run build:kitto build the production site. - Run
npm run start:kitornpm run start:svelteto PREVIEW production site. Do not use it in production!, read about deploying in Readme of choosen adapter.
In the root of project you can find the translation.config.json file.
{
"lang": "ru",
"repo": "https://github.com/sveltejs/sites",
"adapter": "@sveltejs/adapter-node@next",
"adapter_config": "{}",
"api_url": "https://api.svelte.cf/ru",
"api_url_dev": "http://localhost:3030/ru"
}You can customize for your needs. Options are:
lang- language code of current translationrepo- repository URL to fetch original site's filesadapter- package name of the needed adapter for build step. By default using@sveltejs/adapter-auto@nextadapter_config- set adapter's options if needed (only JSON string here)api_url- URL of the production API to fetch site contentapi_url_dev- URL of the development API to fetch site content