Recs Posted May 3, 2016 Report Share Posted May 3, 2016 I am using TNG 10.1.3 and Template 10. In the section admin/setup/configuration/template settings, I have the following in the Features links text box: Administrators, extra_pages/administrators.php Cemeteries, extra_pages/cem_db.php Facebook, https://www.facebook.com/BirkenhoerdtProjekt/?fref=ts FAQs, extra_pages/faq_deutsch.php Links, extra_pages/links.php What I’m looking for is a way to include the link headings (Admnistrators, Cemeteries etc.) as variables so that they change according to the language chosen by the user. Thank you! Quote Link to comment Share on other sites More sharing options...
Merv Posted May 3, 2016 Report Share Posted May 3, 2016 Hi, An easy way is to install a Google Website Translator Tool , but the translation is not always accurate. Otherwise, you are going to have to do some custom coding in your language files You may want read this which shows you how to put your links in other locations and a bit of text coding. Merv . Quote Link to comment Share on other sites More sharing options...
Recs Posted May 4, 2016 Author Report Share Posted May 4, 2016 Merv, Thanks for your suggestions! The first thing I don't really understand is why many of the elements of template 10 can be rendered in all of the languages on offer, but the box with the feature links remains a plain text box. I reckon that's something that I should address to Darrin directly for future fixes. It would be very helpful to my solving the problem on my own if I knew where to retrieve the data for the $tmp['t10_featurelinks'] variable. I might be able to save blocks of text of all languages on offer there and then have the correct block of text chosen by filtering using the languageID variable. Quote Link to comment Share on other sites More sharing options...
Merv Posted May 4, 2016 Report Share Posted May 4, 2016 Hi Recs, There is nothing broken for Darrin to fix. The basic elements you describe have per-installed language coding (php text variables) attached to them in the various language files..When custom links are installed, then custom code (php text variables) need to be installed into the language files for these to translate into the various languages. I don't think php text variables will work inside the features section as it only accepts HTML coding, so you will need to place your custom links somewhere else. I would suggest your left menu because there is plenty of space. This is done in your template 10 index.php file. If you see how the existing links there are coded to accept the different languages, then you may be able to figure out what you need to do in the language files in order for these custom links of yours to translate. more info here... http://tng.lythgoes.net/wiki/index.php/Text_variables_-_explained As I said at the beginning... the easy way is a Google Translate Tool. Not perfect but a lot less hassle. Merv ps I would recommend you reduce the size of your homepage image by 2/3rds as it shoots off the side of the page on most screens. 300px wide would look better. Quote Link to comment Share on other sites More sharing options...
Recs Posted May 5, 2016 Author Report Share Posted May 5, 2016 Hi Merv, Thank you for again taking the time to help me find a solution! Although my profile says 'newbie', I've been using TNG for about 10 years now in a multilingual environment. Just so there are no misunderstandings; I am very much a satisfied user of TNG and am generally in awe of the excellent work done by everyone working to continually make TNG a better product. But in this case, I do feel that it should be possible for users to translate the feature links by using the template settings page just as one can translate many other items such as the main title, the header subtitle, the welcome headline, the welcome paragraph etc. I'm sure it's only an oversight. I have solved the problem for myself by adding the text variables to the appropriate custom text file for the languages in question (Dutch, English, French, and German) and then in template 10's index page commenting out the line "echo showLinks($tmp['t10_featurelinks']);" and adding echo("<img src='img/blockcontentbullets.png' width=7 height=7><a href=" . $text['feat_link1'] . ">" . $text['feature1'] . "</a><br />"); echo("<img src='img/blockcontentbullets.png' width=7 height=7><a href=" . $text['feat_link2'] . ">" . $text['feature2'] . "</a><br />"); echo("<img src='img/blockcontentbullets.png' width=7 height=7><a href=" . $text['feat_link3'] . ">" . $text['feature3'] . "</a><br />"); echo("<img src='img/blockcontentbullets.png' width=7 height=7><a href=" . $text['feat_link4'] . ">" . $text['feature4'] . "</a><br />"); echo("<img src='img/blockcontentbullets.png' width=7 height=7><a href=" . $text['feat_link5'] . ">" . $text['feature5'] . "</a>"); Thanks for your advice concerning the size of the main image! Recs Quote Link to comment Share on other sites More sharing options...
Merv Posted May 5, 2016 Report Share Posted May 5, 2016 Hi Recs, Looks like you've solved the problem. One thing I do notice though is the bullets next to the links don't display. You may have to compare the coding of these to the coding of the link in the resources section. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.