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

Simple Translator (formerly known as Another Language Switcher)

Development and Programming

Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

@Agile Apricot

You can use any field you want, body=>body_jp, extras=>extras_jp, other_stuff=>other_stuff_jp. It’s entirely up to you.

@Mark Bowen

Thanks, forgot to update the language file, I’ll fix that now. Also I went with “translator:simple” for the exact reason ingmar mentioned. Who knows someday there may be a translator:advanced or just a translator module or a translator:quick or translator:utf8.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
18 years ago
Mark Bowen's avatar Mark Bowen

Hi Ingmar / Mark,

Thanks for the explanation. Pretty much understood now so thanks for that.

@Mark Have already updated this on my language file because knowing me I would probably forget the syntax if I hadn’t. I’m always going into the Settings / Documentation for plugins and extensions because my head is so full of code that I can never remember it all!! 😊 Thanks for saying that you will update it though. I’m sure it will help others…

…that is if anyone else has a head like a sieve like me!! 😊

Thanks again for all your continued excellent work for use with EE!!

Best wishes,

Mark

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven

I’ve just had an idea! Would it be possible to also make this plugin switch section/weblog based on the language selected using the prefix method?

The trouble I’m faced with is I’m making a big site where each language needs it’s own weblog (for SEO reasons and so translators don’t overwrite each other).

The problem with this idea is the extension works based on url, BUT what if it was based on a unique custom field ID? I’m just trying to make it so I only have to make one set of templates for this site.

I’m not suggesting you change the plugin i’m just asking if you think this would work, I have a PHP programmer I can get to build it. Thanks Mark.

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

@Agile Apricot

I think this could absolutely work. It would most likely behave the exact same way as the category switching.

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

@Agile Apricot,

The new version now allows switching weblogs in a very similar manner to the way categories are switched. The documentation has been updated in the extension settings page.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
18 years ago
Mark Bowen's avatar Mark Bowen

Hi Mark,

Great update, thanks for that! I think you may still need to update the language file to deal with the {exp:language:switcher} bit though 😊

Thanks again for all your fantastic work with EE. Absolutely one of the best people out there…

…oh and a very good name you have too!! 😊 😊

Best wishes,

Mark

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

Thanks, Mark. Don’t know how that tag snuck back in there, it should be out now.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
18 years ago
Mark Bowen's avatar Mark Bowen

Hi Mark,

Thanks for the update and a massive thank you again for all the great work!!

Just one word really…

…F-A-N-T-A-S-T-I-C!!! 😊 😊

Best wishes,

Mark

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven
@Agile Apricot, The new version now allows switching weblogs in a very similar manner to the way categories are switched. The documentation has been updated in the extension settings page.

Excellent. Thank you so much Mark.

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven

Hi Mark.

I’m back. Is it possible to get this plugin to switch global variables based on the selected language. For example…

{branding_en}

would switch to…

{branding_de}

If you were viewing it in German.

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven
Hi Mark. I’m back. Is it possible to get this plugin to switch global variables based on the selected language. For example… {branding_en} would switch to… {branding_de} If you were viewing it in German.

Opps, add embeds to that request too.

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

alright textdriven, 1.0.9 should switch global variables now. it works the same as always, use {branding} for your default language, and {branding_ja} for japanese specific content.

as for embeds, it is a little trickier as I don’t have access to the template through an extension. You could however do this with a conditional:

{if simple_language == "English"}
...
{if:elseif simple_language == "German"}
...
{/if}
       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven

Thanks Mark. So If a global viable doesn’t have renditions in other languages it will still use the normal one for all languages? I have a quite a few cases where it is just html in a variable that doesn’t need to change

For embeds I just meant embed names. Like this one…

{embed="global/communication_en"}

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

you got it textdriven, it will always use your default language unless another is available. for embeds though I’d still recommend the conditional approach as I mentioned above. I’ll continue to look into the switch though.

       
textdriven's avatar
textdriven
107 posts
18 years ago
textdriven's avatar textdriven

Great. Thanks Mark.

It’s only because I’m running sites with 8 languages that I thought switching the name of the template it embeds would be useful. I’ll try it the other way otherwise. Thanks.

       
First 3 4 5 6 7 Last

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.