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
  • Adding __ class
  • Dynamic HTML
  1. BabelShark basics

Source string markup

PreviousCode snippetsNextSetting visitor's language

Last updated 1 year ago

You need to explicitly markup your source strings (strings to translate) in your HTML. This is being done by using __ CSS class.

BabelShark picks up these string from HTML and replaces them with a translation to the user's language.

Adding __ class

To mark your string as one to be translated, just add CSS class:

Dynamic HTML

The most of modern HTML frameworks (React, Vue, Angular) dynamically add, remove and replace text in HTML DOM elements.

BabelShark tracks changes in page contents and translates new strings.