GuestLens Languages

Run your site

Translate GuestLens

GuestLens ships in English. Every piece of text on the site comes from a language file, so you can translate the whole site without touching the page templates: the guest pages, the slideshow, the host and admin screens, the emails, and the printed cards.

Add a language

  1. Copy lang/en.json to a new file in the same folder. Name it after the language code, for example lang/de.json for German, lang/es.json for Spanish, or lang/pt_BR.json for Brazilian Portuguese.
  2. Open the new file in a text editor. Each line has the English text on the left and the text to show on the right. Translate the right side only. Leave the left side exactly as it is, because GuestLens uses it to find the line.
  3. Upload the file to the lang folder on your server.
  4. In the admin, open Settings, choose the language under Language, and press Save.

A line you have not translated yet shows in English, so you can translate a little at a time.

{
    "Your uploads": "Deine Uploads",
    "Shared by :name": "Geteilt von :name",
    ":count file|:count files": ":count Datei|:count Dateien"
}

Rules for the text

Standard form errors

A few standard messages, such as "The email field is required.", come from the four files in lang/en/. To translate them, copy that folder to a new folder with the same language code, for example lang/de/, and translate the text in each file. Ready-made translations of these files for many languages are published by the open-source Laravel Lang project.

What changes by itself

Change the English wording

To change a word in English, do not edit lang/en.json, because an update replaces it. Copy it to lang/en_US.json, change the right side of the lines you want, and choose that language in Settings.

After an update, check for new lines. A new version can add lines to lang/en.json. Your own file keeps working, and the new lines show in English until you add them. The Changelog says when text was added.

Right-to-left languages, such as Arabic and Hebrew, are not tested. The text translates, but the layout still reads left to right.