BabelShark Knowledge Base
  • Introduction
  • BabelShark basics
    • Getting started
    • Project modes
    • Project languages
    • Code snippets
    • Source string markup
    • Setting visitor's language
    • Project associated texts
  • Setup
    • Recommended approach
    • Coexistence with other translators
    • Scopes
    • Performance
  • FAQ
  • Site owner's manual
    • Introduction
    • Real-time language statistics
    • Working in a team
  • Developer's manual
    • Embed BabelShark script
    • API Reference
      • BabelShark config
      • Language drop-down specs
    • HTML markup
      • Variables
      • Issues
    • Integrations
      • Tilda Publishing
        • Tilda website setup
        • Elements to localize
  • Manager's manual
    • Introduction
    • Community proofreaders
  • Proofreader's manual
    • Introduction
    • How to proofread
    • Checking translations
    • Translation types
    • Request of re-checks
Powered by GitBook
On this page
  1. BabelShark basics

Code snippets

PreviousProject languagesNextSource string markup

Last updated 1 year ago

The main code snippet to enable BabelShark translation is available at your project page:

Adding this code snippet initiates the loading of BabelShark code, its API and project settings. If current user has a translation language selected, the project will seamlessly switch to that language.

Language drop-down

If you want to display a built-in language selection drop-down, add .bs-activator element to the required position:

<span class="bs-activator" data-drop="auto"></span>

This will render a language selector:

about language drop-down configuration and parameters.

Read more