JS Proxy Integration
Synchronize all source files with your project and send new translations from project to your website immediately.
Import/Update Source Texts
*
or **
or exclude paths with !
at the beginning of path.
Include paths examples:
/about
- Will match exact page /about
/page/**
- Will match all pages starting with /page/
/article/*
- Will match all pages with one level above /article/
, for example /article/1/2
will not be matched as it has more than one level
/**/comments
- Will match all pages that end with /comments
Exclude paths examples:
/page/**
- Will exclude all pages starting with /page/
Publish Translations
Latest translations will be available for over-the-air delivery for your website
Integrate Language Switcher
Just add a JavaScript snippet like you do with Google Analytics. This will let your visitors see the language switcher.
What is JS Proxy?
JS Proxy – is a technology aimed at helping teams localize websites that don’t support localization from the start or require manual content updates. With JS Proxy you can localize static content, knowledge bases, landing pages, status pages, and more. No need to manually export source content or copy-paste translations.
How does it work?
-
Import texts from your website.
At this step you don’t have to make any changes to your website. JS Proxy will crawl your website and extract all of the translatable texts. In your Crowdin project you will find a new file with every text for translation. -
Translate your content.
In your project, you will find a new file with texts for translation. -
Publish translations
Add the automatically created JavaScript snippet to your website. This snippet can be inserted at the header of your website. Some services and website builders suggest a separate place to work with the code. For example, WordPress has the Header and Footer Scripts plugin, Webflow – Custom Code option.
After this, the language switcher will appear on your webpage.
How to set up the JS Proxy integration?
- Enter your website’s URL and click Import Now. Website content will be scanned and automatically added as a .json file to the Files section.
- Choose your translation strategy and translate your website
- Add a language-switcher to your website by inserting the JavaScript snippet displayed on the app configuration page inside the <head> tag of a page or before the </body> tag.
- Use the Import section of this plugin every time new content on your website needs to be translated.
- Click Publish Now to publish new translations.
Customization
To customize the language-switcher, send the following parameters:-
- position:
-
'bottom-right'
|'top-right'
|'bottom-left'
|'top-left'
(for sticky position) -
'inline'
|'left'
|'right'
(for inline position)
-
- submenuPosition:
'top-right'
|'bottom-right'
|'top-left'
|'bottom-left'
- class:
'some-value-for-your-custom-class'