Admin Languages

From TNG_Wiki
Jump to navigation Jump to search
Admin Languages
Summary Simplifies the entry of languages by combining the Search, Edit, and Add New forms into one screen, and provides more meaningful prompts for languages and character sets.
Validation
Mod Updated 22 Sep 2023
Download link For
TNG 15.0
TNG 14.0

v14.0.0.6b

(Older downloads are in the Revision History)
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod 14.0.0.6b
Min TNG V 10.1
Max TNG V v15.0
Files modified
admin_languages.php, English cust_text.php
Related Mods
Notes
* Removed showmodnames Include statement but not the whole location.
  • Removed conditional MM Logic in 3 locations that distinguished between TNGv13 subversions
  • Changed the search text in one location to match a change in TNGv14


Purpose of the Mod

This mod improves workflow by combining the Search, Add New, and Edit forms into one screen. The mod also enhances the Add New Language form to come up with more meaningful values for the Display Language and Character Set fields. That is, depending on which language folder is selected by the user,

  1. The input box for the language display value (e.g. German vs Dutch vs German-UTF8, etc.) may be converted into checkboxes that populate an input box into which the user can ultimately enter an arbitrary value.
  2. The input box for the character set is initialized to "UTF-8" for all UTF8 language folders, to "ISO-8559-2" for Czech and Polish, and to "ISO-8559-1" for all other language folders.

Mod Options

none

No Conflicts

No other mods affect admin_languages.php.

Installation

This mod does not install any files, but it does still have a mod subfolder, which contains the mod's language strings. That is, this mod's language strings are not defined in its .cfg file nor copied to cust_text.php files. As a result

  • This mod's language strings are loaded only into the TNG programs that need them, not into all TNG programs, and
  • It is easier to create, edit, test, and save translation for this mod than for mods that use standard cust_text.php strings.

This non-standard technique should be invisible to you unless you want to define a translation or override any of this mod's string values.
Read more about this technique, the simplified translation process, and the procedure for defining site-specific overrides to its language strings.


[Show Installation Details]

Requirements

  • A working TNG installation.
  • An installed current version of the Mod Manager.
  • You should backup files listed in the panel on the right.

Procedure

  1. Remove and delete previous version of this mod.
  2. Backup the files updated by this mod. They are listed in the panel at the upper right.
  3. Download the .zip file, Extract its .cfg file to the mods folder.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.

Problems?

  1. Try using the Mod Manager Remove capability
  2. Contact me through My Mod Support form.
[Hide Details]


Visualizations

BEFORE INSTALLATION
Admin>>Languages Search Page, with the typical TNG Admin search page layout
Admin languages-before1.png
BEFORE INSTALLATION
Admin Languages "Add New" page
Admin languages-before2.png
AFTER INSTALLATION: The fundamental feature of this mod is that all functions (search, add new, and edit) are combined into one page
AFTER:
Admin >> Search results with Add New form
This is the new Admin>>Search page showing two of the three components of the new page. The Add New form is always visible in this page.
Admin languages-after1.png
AFTER:
Search page with all three components
The edit form for Danish-UTF8 pops up inside the search results table, immediately below the Danish-UTF8 search result row.
Languages-after-edit.png
AFTER:
Add New UTF-8 Language
As soon as a UTF-8 Language Folder is selected:
  1. A default value for the displayed language name is filled in
  2. In some languages, radio buttons pop up to facilitate the selected of other likely language names.
    • There are generally 4 choices - The English word for the language and the native word for the language, plus both words appended with UTF8.
      • (I suspect that TNG sites are unlikely to offer both character sets for the same language, but I found the UTF8 suffix handy on test sites.)
    • If I couldn't figure out the native language's word for the language or if the native word is the same as the English word, there are just two choices.
  3. A default character set is placed in the Character Set Field (It is always UTF-8 for UTF-8 languages.)

Admin languages-addUTF8.png

Sometimes, The language name field displays HTML entities in place of accented characters. But
  • The true character will appear if you select that name with the radio button, and
  • It does save the value correctly even when you see the HTML entity.
AFTER:
Add New non-UTF8 language
Behaves just like UTF8, except
  • Language name radio buttons: There are never more than two choices because there is no need for the UTF-8 suffix.
  • Character set:
    • ISO-8559-2 for Czech and Danish (This doesn't seem quite right. I'll check it out, but [if you can let me know, that would be great.)
    • ISO-8559-1 for all other languages

Admin languages-addISO.png

Revision History

Mod Version TNG Versions Date Note
14.0.0.6b 14+ 23 Sep 2023
  • Updated one target location to match a change in TNGv14.
  • Improved logic that displays the "Needs Mod Settings Blocks" message in the Mod Manager.
13.0.0.6a 13-13.0.1 17 Nov 2020 In both admin_addlanguage.php and admin_updatelanguage.php, split one location into two conditional locations
 to handle a syntax error correction in TNGv13.0.1.
13.0.0.6 13 20 Sep 2020
  • Had to undo the effects of the new TNGv13 "Save+Stay" buttons on admin_newlanguage.php and admin_updatelanguage.php
  • Upgraded the success message to include the language folder and encoding.
  • Upgraded to the TNGv13 version of the Inner Mod Menu Mod.
12.0.0.4b 12.0 - 12.3 28 Mar 2019 No functional changes.
  • Adds my Inner Mod Menu, and cleans up some language strings.
12.0.0.4 12.0+ 4 May 2018 No functional changes; made compatible with TNGv12.
11.0.0.4 11.0 - 11.1.2+ 1 Dec 2017 - Updated the mod for TNGv11, which added a field to the Languages table.

- Inside the .cfg file, added comments to remaining code fragment locations
- DisplayModNames is now optional

10.1.0.3 10.1.0 - 10.1.2 18 Sep 2015 Fixed the problem that causes version 2 to uninstall badly. Also defaults to ISO-8559-2 for Czech and Polish non-UTF language folders.
10.1.0.2 10.1.0 - 10.1.2 12 Sep 2015 Added the edit form to the Search & Add New page. Added logic to provide choices to populate the Display and Character Set fields.
10.1.0.1 10.1.0 - 10.1.1 30 Apr 2015 Initial release.

Sites using this mod

If you download and install this mod, please add your site to the table below.

URL User Note Mod-Version TNG-Version Language
Robin Richmond's Genealogy Database Robin Richmond Mod developer v14.0.0.6b 13 EN
MOTYER & BENJAMIN Family Genealogy (Bermuda branches) John Mark Motyer Public site See here See here EN