Body Text for Translation

From TNG Wiki

Jump to: navigation, search
Body Text for Translation
Summary Uses the Body Text input field for translation of the text on images
Download link media-3_body_text_v8.1.0.zip for TNG V8
media-3_body_text_v1.2.zip if you are NOT using Bret Rumsey's Image Viewer for TNG V7 only
media-3_body_text_w_viewer_v1.2.zip if you ARE using Bret Rumsey's Image Viewer for TNG V7
Author(s) Ken Roy
Homepage Body Text for Translation (This page)
Mod Support TNG Forums
Latest Mod 8.1.0 for TNG V8
1.2 for TNG V7
Min TNG V 7.0.0
Max TNG V 8.0.0
Files modified See TNG Modules Involved
Related Mods Media - 1 - Image Viewer Mod (for TNG V7 only)
Media - 2 - ShowTable Mod
Media - 4 - Tooltip Mod
Media - 5 - Image Map Message Mod
Notes If using Bret Rumsey's Image Viewer Mod you must install media-3_body_text_w_viewer_v1.0.zip
If you also install the ShowTable Mod, it should be installed before this mod.
Please update your additional language cust_text.php files with translations based upon the Custom Text Additions for this mod.

Contents

Purpose of the mod

This mod was designed to use the Body Text input box for Histories and media collections that behave like histories to contain the translation text for the image and to display both the image and the translation text. It displays the translation text in the table below the image.

This mod applies to TNG 7.0 and above. The mod will work with TNG version 6, but the line numbers will be different and an additional change is required to admin/mediautil.js to make other media types behave like histories so they will have the Body Text input box on the Admin Media screen.

Developer

Ken Roy developed this mod so that English translations could be provided for original documents in a different language, such as French that are often lengthy without having to use the Description text box for that translation.

Advantages

Using the body text input box and displaying both the body text and the image

  • eliminates the need to put translations in the Description
  • avoids cluttering the media collection list with extra information
  • displays the translations in a separate row in the table below the image

Revision History

Note that there are two different flavors of this mod:

  • one to be installed when not using Bret Rumsey's Image Viewer Mod
  • other to be install when using Bret Rumsey's Image Viewer

The version numbers are kept the same, but the config file name is different.

Version Date Contents
v8.1.0 24 May 2010 updated for TNG V8
v1.2 23 December 2009 updated to add its own global line to eliminate a conflict with Auto Email Original mod
v1.1 15 December 2009 updated to add missing $mediatypeID in global statement which prevented the mod from working correctly
v1.0 14 Jun 2009 initial config file release

Requirements

Automated Install

For TNG V8

  1. Download the media-3_body_text_tng8_v2.3.zip
  2. Unzip the appropriate config file into your mods folder
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the appropriate config file.

For TNG V7

  1. Download the media-3_body_text_v1.2.zip if you are NOT using Bret Rumsey's Image Viewer
  2. Download the media-3_body_text_w_viewer_v1.2.zip if you ARE using Bret Rumsey's Image Viewer
  3. Unzip the appropriate config file into your admin/mod_folder
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the appropriate config file.


Note that the media-3_body_text_v1.0.cfg or media-3_body_text_w_viewer_v1.0.cfg file is part of a series of media display mods where the n in media-n designates the install order of the mods. If you use Bret Rumsey's Image Viewer it must be installed before this mod. Also if you are using the ShowTable Mod it must be installed before this mod.

Note that for TNG V8 there is only one version of this mod, since the Image Viewer is now part of TNG.

Custom Text Additions

Note that config file only includes the English language changes, so if you support multiple languages you will need to modify the config file to add the custom text for those other languages.

The following custom text will be added to your English/cust_text.php file by this mod. If you are using other languages, you must add these lines to each of your language cust_text.php files with appropriate translations of course.


//Body Text for Translation - Ken Roy's mod
$text['mediatranslation'] = "Translation"; 

For example, you would add to the French/cust_text.php

//Body Text for Translation - Ken Roy's mod
$text['mediatranslation'] = "Traduction";

Note that for TNG V8, the $text variables are within single-quotes, and the English/cust_text.php changes were provided for both the languages/English/cust_text.php and languages/English-UTF8/cust_text.php files.

Visualization of this mod

Without Mod

Without this mod, the media record Body Text content is displayed without the image as shown in the image on the right.

Without this mod, if the user wants to display both the image and the translation of the text from the image, they typically have to enter the translation text in the Description field, as shown on the right.

Putting the translation text in the Description field results in the Media List containing more information than the description of the image and it also results in the Description field being truncated, unless you change the truncation value.

With Mod Installed

With the Body Text for Translation Mod, the Body Text field and the image are both displayed. The Body Text is shown in the table below the image as shown in the image on the right.

With ShowTable Also Installed

Note that if you are also installing the ShowTable mod, it should be installed before the Body Text for Translation Mod, so the table fields will display in a more logical order after the media as shown in the image on the right.

TNG User sites using this mod

  • Please add TNG site that you have found that utilize this modification

Site List

Related Mods

The following Media mods may be related. The number indicates the install order if you install more than one of these mods:

TNG Modules Involved

In TNG V8, the following modules are updated:

  • showmedialib.php
  • languages/English/cust_text.php
  • languages/English-UTF8/cust_text.php

and the following module is created:

  • extensions/bodytext_imageviewer.php

In TNG V7, the following modules are updated:

  • showmedialib.php
  • English/cust_text.php

and the following modules are created:

  • extensions/bodytext_imageviewer.php for use with Image Viewer Mod
  • extensions/bodytext.php when not using the Image Viewer in TNG V7
Personal tools
Translators