Skip to content

About

Translate the whole Botble CMS website into 45 languages with Google Translate and a flag switcher. Free, MIT.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Website Translator

Translate your whole Botble CMS website into other languages with a flag switcher, at no cost and with no manual translation. When a visitor clicks a flag, Google Translate translates the page in their browser, and the choice is kept while they browse the site.

Free plugin. Requires Botble CMS 7.4.0+ and works with any theme.

Full user guide with screenshots: docs/documentation.html (open it in a browser).

Demo video: https://youtu.be/C7NKKHpDe0Q

Screenshots

Original language After clicking the Vietnamese flag
Original Translated
Flags in the theme header Floating switcher (themes without a slot)
Header flags Floating switcher
Settings Switcher and glossary settings
Settings Glossary

Is it right for your site?

Advantages Disadvantages
Free, no Google account or API key Machine translation, can be inaccurate
No manual translation, new content is translated automatically No SEO for other languages: no per-language URLs or hreflang
45 languages Text shows in the original language for a moment, then switches
Glossary for menu labels and brand names Translated text cannot be edited (except glossary terms)
Works with page caching Needs access to Google (not available in mainland China)

If you need search engines to index other languages, or exact translations, use the Language and Language Advanced plugins instead.

Installation

  1. Upload the website-translator folder to platform/plugins/.
  2. Deactivate Language Advanced and Language. Website Translator replaces them and stays off on the website while the Language plugin is active.
  3. Activate Website Translator from Admin → Plugins (or php artisan cms:plugin:activate website-translator).
  4. Configure it in Admin → Settings → Others → Website Translator.

No database tables are created and no core or theme files are changed. Removing the plugin from the admin deletes its settings.

Switching from the Language plugin

Content the Language plugin stored as separate records per language (posts, pages, menus...) is no longer hidden once that plugin is off, so every language shows side by side. The settings page counts these leftover items. Back up the database, delete the extra-language items while the Language plugin is still active, then switch. Translations saved by Language Advanced are not affected. Section 5 of the user guide has the step-by-step instructions.

Settings

  • Website language: the language your content is written in.

  • Languages in the switcher: the languages visitors can choose.

  • Switcher display: flags, flags and names, or names only.

  • Floating switcher: shown in a bottom corner when the theme has no language switcher slot.

  • Glossary: one term per line.

    Liên hệ | en: Contact | zh-CN: 联系我们 | ko: 문의하기
    Botble
    

    The first line fixes a label's translation for each listed language. The second line keeps a brand name untranslated wherever it appears.

For theme developers

Themes that call apply_filters('language_switcher') get the flags in that spot. To place them yourself:

{!! apply_filters('language_switcher', null, ['class' => 'my-header-flags']) !!}

CSS classes: bb-translator, bb-translator__item (is-active on the current language), bb-translator__flag, bb-translator__name.

Privacy

Google's script is only loaded after a visitor picks a language other than the website's. From then on the page text is sent to Google to be translated, and the choice is stored in the googtrans cookie. Mention Google Translate in your privacy policy.

License

MIT. See LICENSE.

About

Translate the whole Botble CMS website into 45 languages with Google Translate and a flag switcher. Free, MIT.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages