We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Multi Language Module

Development and Programming

Ben @PutYourLightsOn's avatar
Ben @PutYourLightsOn
295 posts
16 years ago
Ben @PutYourLightsOn's avatar Ben @PutYourLightsOn

the Multi Language Module is ready (introduced here). i’m offering it for free to non-profit organisations and students. also for anyone who has something suitable to exchange (ideas welcome).

http://www.putyourlightson.net/projects/multi_language

       
jeremydouglas's avatar
jeremydouglas
292 posts
16 years ago
jeremydouglas's avatar jeremydouglas

Dang, I just finished a site that could have used this at about the same time this was posted. Right now we have phrases in global variables, but your solution looks much nicer. Will have to use this next time.

       
sambo's avatar
sambo
80 posts
15 years ago
sambo's avatar sambo

Hi,

this looks interesting. Can I retrieve the language strings from my own custom plugins?

Best, Sammi

       
Ben @PutYourLightsOn's avatar
Ben @PutYourLightsOn
295 posts
15 years ago
Ben @PutYourLightsOn's avatar Ben @PutYourLightsOn

in theory yes, you can, as long as your plugin takes care of rendering the language strings before the multi language expression is rendered.

       
Gagarinis's avatar
Gagarinis
3 posts
15 years ago
Gagarinis's avatar Gagarinis

Hi,

do you know of any success stories where users combine this with the Structure module?

Best, Sammi

       
sambo's avatar
sambo
80 posts
15 years ago
sambo's avatar sambo

Here is a fix for the depreciated eregi method in mcp.multi_language.php:

Change this:

if ( ! eregi("^[a-zA-z0-9\_\-]+$", $_POST['phrase_index'])) 
{
    $error[] = $LANG->line('invalid_characters');
}

to this:

if (!preg_match("/^[A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*$/", $_POST['phrase_index'])) 
{
    $error[] = $LANG->line('invalid_characters');
}

And then you are allowing alphanumerical characters and an underscore as a delimiter.

Best, Sammi

       
Ben @PutYourLightsOn's avatar
Ben @PutYourLightsOn
295 posts
15 years ago
Ben @PutYourLightsOn's avatar Ben @PutYourLightsOn

thanks for posting this sammi!

       
sambo's avatar
sambo
80 posts
15 years ago
sambo's avatar sambo

You’re most welcome.

Sammi

       
sambo's avatar
sambo
80 posts
15 years ago
sambo's avatar sambo
in theory yes, you can, as long as your plugin takes care of rendering the language strings before the multi language expression is rendered.

Could you explain a bit more? I have not been able to do this.

Best, Sammi

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.