Language strings in Speedy Translate

Buttons, labels and messages come from language files (.ini), not from the database. Speedy Translate finds any of them and lets you change it, without editing a file.

A language string is a constant and its value, one per line:

COM_CONTENT_READ_MORE="Read more"

COM_CONTENT_READ_MORE is the constant the code asks for; Read more is the value visitors see. Every language has its own file with the same constants.

INI translations: search and change a string

Open INI translations from the dashboard.

  1. Type what you are looking for: a piece of the text, or a constant.
  2. Choose what to search: Value, Value (case sensitive) or Constant.
  3. Choose the language, and press Search.

Each result shows the constant, the file it comes from, after the language's flag, and its value. Change the value and press the save button on its row: Language string saved. shows under the value. If the save fails, its message stays there until the row is saved again.

INI translations: the French strings whose value holds Lire la suite, each with its constant, file, an editable value, a save button and a Suggest a translation button.

Every French string whose value holds “Lire la suite”, in Joomla and every extension.

Your change is saved as an override in Speedy Translate's own folder, not in the language file, so an update of Joomla or of the extension does not undo it. A few words are reserved and cannot be constants: YES, NO, NULL, FALSE, ON, OFF, NONE, TRUE.

With a machine translation provider set up, a row has a second button, Suggest a translation. It translates the string from its text in your administrator language (the same constant, in that language's file) and puts the suggestion in the value, for you to read and save. Press it again to bring back the original text, and again for the suggestion: the provider is asked only once. When no suggestion comes, the row says why, for instance that the string has no text in your administrator language. The button is offered only for the languages a provider translates into, so not for your administrator language itself.

Context translation PRO

Sometimes the quickest way to find a string is to point at it. With context translation, you click a text on the page and change it there, on the site or in the administrator.

  1. Turn on Enable context translation in Options → General.
  2. Log in, on the site or in the administrator, as a user who can configure Speedy Translate (a Super User, typically). A dark Translate in context switch appears in the bottom corner of each page.
  3. Turn the switch on: the page's language strings are underlined. Click one, and an editor opens beside it with the string's constant and language.
  4. Type the new text and press Enter or Save; Esc or Cancel closes the editor. The page shows the new text at once, or asks you to reload it when it cannot.
  5. Turn the switch off to use the site normally again.
The French home page with the Translate in context switch on: the editor of the string COM_CONTENT_WRITTEN_BY in fr-FR, with Rédigé par : %s typed in, Cancel and Save buttons, and a note to keep the placeholders.

Écrit par, the French “Written by” of an article's details, being changed to Rédigé par.

The editor shows a string as the language file holds it: Écrit par : %s, not the author's name the page filled in. Keep placeholders such as %s, as the page fills them in, and any markup the string has. A click on a string inside a link or a button edits it rather than following the link. Speedy Translate's own strings, such as the switch's, are never underlined.

Exclude keys lists strings context translation leaves alone, one per line. Date formats are in it by default, as turning them into editable text would break the dates.

Syntax checker PRO

A single stray quote in a language file can hide strings or break a page's scripts, and Joomla does not say where. The Syntax checker reads the files for you.

The syntax checker: a file list, a language, a Check button and the rules a valid language string follows.
  1. Choose All files or one file, and the language. Press Check.
  2. Each problem is listed with its line: a syntax error, or a file that is not valid UTF-8, a common cause of broken AJAX on some sites.
  3. Fix syntax repairs what it can. It writes a backup of the file first.

A valid line has one CONSTANT="value" pair; a unique constant that is not a reserved word; a value in double quotes, with any quote inside it written \"; and no % unless it is a placeholder.

Find duplication PRO

A constant defined twice in a file confuses translators: only one of the two values is used. Find duplication lists them, per file and language, so you can delete the extra line.

Orphan and missing keys PRO

For extension developers and site builders cleaning up. Open Orphan and missing from the dashboard, choose a language, All extensions or one of them, and a search:

  • Missing: constants the site's code uses that no language file of that language defines. Visitors see the raw constant instead of text.
  • Orphan: constants a language file defines that no code uses any more. Each is listed with the file that defines it and its value.
Orphan and missing: the orphans of com_categories in English, seven constants each with its file and value, and below them 25 more strings that may still be used.

The orphans of Joomla's com_categories in English.

It reads every PHP, XML and JavaScript file of the site, so a search of all extensions takes a while on a large site. A string counts as used wherever the code names it, in any case, and a plural form counts with its string. Code can also build a string's name as it runs, from a start such as COM_CONTENT_ and a state: strings whose names start or end like such a name are listed apart, as strings that may still be used, with the name they could be built from. No search can follow that for sure, so check a string before you remove it.

Import and export PRO

The dashboard's Import & Export card, under Language strings, has two buttons: Export saves your language string overrides and their backups in one zip, and Import puts such a zip back, on this site or another. Importing needs a user who can configure Speedy Translate. The zip holds language strings only: translations of content move with the database, or as XLIFF.

All the things you need to make your work easier. Did you like Solidres?