Author Topic: Weather_Blues v2: New Fall-Back language feature!  (Read 4176 times)

Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Weather_Blues v2: New Fall-Back language feature!
« on: August 11, 2013, 10:58:07 AM »
Dear members,

Recently, I've worked hard on language files to implement mothod
to add a (Default) "Fall-Back" language feature for missing words
in translations. This way, all that feature is included in language
files and then easily updatable with your Template Manager Module
with near zero impact on your Template.

Since your pages could have been adapted (as opposed to _txt.php files)
2 ways are available to update these pages: you could simply let TMM
do the job or decide to do yourself the only line to edit
(if your page is customized and want to keep it that way):

Then at line 23, the following lines:
Code: [Select]
// Include text and data file
require('lang/text_standard_'.$lang.'.php');
include('wt_data_inc.php');

Has to be changed to:
Code: [Select]
// Default Fall-back language (set to English)
require('lang/text_standard_en.php');
// Include text and data file
require('lang/text_standard_'.$lang.'.php');
include('wt_data_inc.php');

Note: For manually edited files, you have to increment version number
to match current version (in your TMM).


This way, you'll never have an empty word, regardless of language selected!
Each "Fall-Back" word used will be displayed in italic, if you wish to add
a note for these words.

I invite you to use your Template Manager Module to do updates in this order:
1 - manage.php (TMM itself)
2 - language files
3 - all others

Hope you'll appreciate this new feature for your Weather by You Template!

Your friendly Weathermaster,
Jacques
Please, consider supporting this site