Plug-in Show Language Variant values

With this plug-in you can display all content element values from all language variants (LV) on only one screen. On top you get an overview of the workflow state of the page in all language variants (except translation editor states, yet).

This plug-in displays a matrix between the content elements (language variant dependent and not dependent) and the value of these elements per language variant. Each language variant gets his own column.

Is a value from a LV different from the main LV the row is marked yellow. This makes a check easier, because you can focus on the differences. For text element values the HTML code is included into the plug-in’s table. The plug-in checks the language variant values against the main LV and add a yellow comment “different from …”  for a difference.

You can start the plug-in regardless of the current language variant you work in. The main language variant is always the first column, all other language variants are coming right beside. Therefore the layout of the matrix is always the same to prevent confusion.

Although the plug-in code switches the language variant to collect all values it preserves your current language variant selection. The displayed LV in MS is still correct after you close the plug-in again (and even after an error).

The goal of this plug-in was to check the translators work. The plug-in is used to get all information on only one big screen.

With this plug-in you get a fast overview of the content of a page for all language variants. Using standard functionality you have to change the language variant which is quite time consuming.

Location in SmartTree
You found the plug-in under Administer Project Structure > On every page.

How it works
The plug-in immediately starts without any further questions. On top the screen echos the page you selected and the language variant you are currently working in.

This example uses 4 LVs and English is the main LV.

As mentioned the table on top show all page meta data and the workflow state while collecting all LV values from the current page. Currently the states from translation editor are not included, e.g. waiting for translation.

In the bottom table you get the matrix between content elements retrieved from the underlaying content class and the LV value.

The number of columns of both tables depend from the number of LV you have in your project. Therefore a horizontal scrolling could not be prevented (but is not shown) here even for this example for 4 LVs.

After the columns for the element name and type you get 2 columns showing if the element’s value is LV dependent or not.

Column 5 contains always the element’s value of the main language variant. To the right you get an additional column with the element’s value for each LV. If an element is not LV dependent in the cell n/a is displayed to indicate this.

All LV dependent elements are marked yellow. For text elements the yellow text in the cell “different from en” is used to indicate that the text in a LV is different from the main LVs text. The plug-in checks this explicitely, because small differences are often very difficult to see.

This plug-in can be installed using the combined setup routine for all jRQL API based plug-ins. Follow the instructions in this blog to download the installer and configure the plug-ins you want.

For API developers
The plug-in works mainly in 2 steps:

  1. collect all content element values in a loop by LV
  2. write out the result table in a loop by content element

To support this conversion I mainly uses the helper class LanguageVariantDependentValuesMatrix from the util package to collect the meta data and all content element values. All content element could be retrieved by the method Page > getContentElements().

In addition the standard functions for looping and changing the LV in a project.
Main methods are

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: