16 votes

Polyglot

Create translations for your Umbraco pages with the click of a button, with untranslated content falling back to a default language even for individual parts of a page. A solution that implements what is often called a 1:1 multilingual site structure. This is a free, open-source project.

Polyglot v2.00 is the current version of the package developed for Umbraco 7 and it only supports that version. Previous Umbraco versions (down to 4.5.1) will continue being supported by the Polyglot v1.xx track. You can download that version from the Package Files tab, below. It may be the case someday that 1.xx versions of Polyglot will stop being further evolved but, for the foreseeable future, both branches of the project will continue being developed in parallel.

The most important differences between Polyglot v2.x and Polyglot v1.x are the following:

  • Umbraco 7 does not allow underscores in the aliases of datatypes. Therefore, translation and translation folder names should now look like "HomePageTranslation" and "HomePageTranslationFolder" instead of "HomePage_Translation" and "HomePage_TranslationFolder" which they did in the past.
  • For a similar reason, when using cultures, translation properties in tabs should look like "titlefrFR" instead of "title_fr-FR", which they did in the past.

Key features:

  • 1:1 multilingual support for Umbraco
  • 1-click translation document creation (ok, 3 clicks to be precise!)
  • Defaulting for individual untranslated properties within a page separately
  • Support for Razor & Xslt
  • Support for 2 character language codes or 5 character language-culture codes (e.g. en-US)
  • Support for non-standard languages and cultures
  • Can also use clean URLs with URL rewriting (please read related chapter in the documentation)
  • Support of an alternative way to translate, using tabs

Upgrading: Uninstall the previous version of the package and install the latest one. The created translations will not be deleted, since they are not part of the package. If you are using version 1.6 or higher with non-standard languages, please make sure that the config/Polyglot.config file is not removed when uninstalling (by unchecking it from the list of files to be removed). Otherwise you will need to rewrite it. After the upgrade, all translation document types need to be configured to use the Translation template, as this setting will have been lost during the removal of the previous version. In Umbraco 7, the package may start returning errors after the upgrade. In that case, "touching" the web.config will resolve the issue.

If you are using Umbraco 4.7.0 or earlier and the Polyglot package v1.x razor script version, remember to apply the razor script patch, RazorScriptLegacyPatchForUmbraco4.7.0_xxxx.zip, which is available for download. You just need to unzip it and copy the three files it contains to your macroScripts folder, overwriting the existing files.

You may receive an error that looks like the following on your pages after installing the package:

Error loading Razor Script PropertyTranslation.cshtml

X:\Inetpub\xxxxxx\macroScripts\PropertyTranslation.cshtml(18): error CS0103: The name 'Umbraco' does not exist in the current context

In that case, please install the razor script patch, RazorScriptNoParsingInternalLinksPatch.zip, which is available for download. You just need to unzip it and copy the two files it contains to your macroScripts folder, overwriting the existing files. As of version 1.61 of Polyglot, a method has been added to the translation macros for replacing LocalLink strings in the RichTextEditor datatypes with their corresponding links because they would cause a problem in more recent versions of Umbraco. In earlier versions of Umbraco, this method is not supported though and this is why this patch is needed to remove the method calls.

If you are trying out the package on Umbraco 7.0.2-alpha, please note that I have discovered a bug on that Umbraco version, which I describe here: http://issues.umbraco.org/issue/U4-5524. So try to avoid creating translation document types by copying the original document types, unless the copy will have the same master as the original one.

 Please see Resources and Documentation for more details

Screenshots

Source code

Project owner

dimitri

dimitri

dimitri has 571 karma points

Project Compatibility

This project is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
7.7.x (untested)
7.6.x (untested)
7.5.x (100%)
7.4.x (100%)
7.3.x (100%)
7.2.x (100%)
7.1.x (100%)
7.0.x (100%)
6.1.x (100%)
6.0.x (100%)

You must login before you can report on package compatibility.

Project Information

  • Project owner: dimitri
  • Created: 15/05/2011
  • Current version 2.08
  • .net Version 4.0,4.5
  • License MIT
  • Downloads: 5460

External resources