Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Front End User Login Plugin (XML Or Database - ver: 3.0)
#68
lrsk Wrote:I am having some trouble adding I18N functionality to another plugin I'm using (user-login). I have previously hard-coded messages to the user etc, but would now like to add a language switching capability.

I decided to use I18N for this, and I followed the instructions here to be able to call e.g. i18n_r("user-login/REGISTER_MSG"). This works to a degree, but I am not able to switch between languages.

At first, everything was always English, confirmed by dumping $LANG to the screen. Then I decided to add $LANG = "nb_NO"; To my gsconfig.php file. This made everything Norwegian. The user-login plugin is using the language files I made in user-login/lang/ but I don't understand how to make the ?setlang=en/nb work with it.

Thanks for a great plugin. Hoping for a quick resolution.

The Front End User Plugin does not support the I18N plugin but relies on the $LANG variable.
Depending on how the Front End User Plugin works internally, you might have success with adding the following somewhere to the top of your template:
Code:
<?php global $language; $LANG = $language == 'nb' ? 'nb_NO' : 'en_US'; ?>
(of course this will not work, if the plugin loads the language texts before the template is executed)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
Example site down, having issues - by Rich_K - 2012-11-14, 07:36:37
login box won't display - by horstuff - 2015-11-20, 04:57:25
Front End User Login Plugin (XML Or Database - ver: 3.0) - by mvlcek - 2011-12-03, 00:02:13



Users browsing this thread: 1 Guest(s)