Once the locale is selected, it can be stored in a cookie and will be used on all other pages.

redirect

If locale is not stored in a cookie, redirect will change the url and pass in the locale based on the browser preferred locale

Pre-Path Strategy

The param approach with a cookie is the older and most common way to pass the locale around. But it is not SEO friendly. Pre-path allows you to specify locale as the first element in your pass. For example,

Optional. Some sites, especially WordPress bases sites, may not be hosted directly under your root path "/". So prefix can be used to specify the first path element and the URLs will be constructed as:
https://www.sample.com/{prefix}/ru

Pre-Domain Strategy

This strategy is similar to pre-path but it uses the first sub-domain element for locales.

You may need to configure your server or router for this strategy. And it would be a good idea to enable cookie sharing across all your subdomains. Once you have it setup on the routing side, use the following settings:

Current Source

By default, the SDK will use a full URL path to group all the strings into individual sources. So as you visit different pages, the stings would be grouped together for management and caching. For example:

Source as String

It may be the best and simplest option if your site is very small and you just want to collect all strings into a single source.

Source as Function

Your website can provide a function for extracting a source name. It may be useful if you have URLs with dynamic variable in them. You can use that method to parse the URL and remove the dynamic parts so you don't register too many sources.

Nested Sources

By default, all strings of a specific page are included in the page source. But what if your application contains the same header, navigation bar and footer on each page - by default, all the strings of those sections will be registered on every source, creating unnecessary duplication. You can easily avoid that by grouping the various page sections into their own sources.

You can make any page element into its own source by adding "data-tml-source" attribute to the tag.

<div class="navbar" data-tml-source="navigation">
...
</div>

Any strings that would be found within the div tag will automatically be added to the "navigation" source in the dashboard.

Translator Options

Translator options allow you to customize the DOM extractor, including ignoring certain elements or only translating certain elements.