4 of 9
4
Simple Translator (formerly known as Another Language Switcher)
Posted: 12 May 2007 06:05 AM   [ Ignore ]   [ # 55 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  12-09-2006

Cheers Mark. I’m glad it was just that, I was worried it was some PHP error.

Thank you for making this great extension!

Profile
 
 
Posted: 12 May 2007 09:06 AM   [ Ignore ]   [ # 56 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  12-09-2006

It works great. Is it easy/possible add custom fields named something other than “body” or “title”?

Also there are areas of the site that need to change based on the language like the footer and branding. I thought I would make a new section called “snippets” with a text area custom fields for each language. There just do something like this…

<!-- Branding -->
<
div id="branding">
{exp:weblog:entries weblog="snippets" entry_id="3"}
{body}
{
/exp:weblog:entries}
</div>

...is this the best method for doing this?

Profile
 
 
Posted: 12 May 2007 11:47 AM   [ Ignore ]   [ # 57 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6558
Joined  04-15-2006

Hi Mark,

WOW!!! This is an absolutely amazing solution, thanks a lot. We just finished creating a site in two languages and although the method we used in the end was pretty straightforward, this solution is really impressive. Thanks.

Just one thing I did notice though. When you go to Extensions -> Simple Translator -> Settings the instructions tell you to use :

{exp:language:switcher}

as opposed to :

{exp:translator:simple}

which is what it is supposed to be I think?

Sorry if this has already been mentioned. I did read through most of the replies but sometimes do miss a thing or two!! grin

Once again though, thanks for a simply fantastic extension. Very greatfully received.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 12 May 2007 11:55 AM   [ Ignore ]   [ # 58 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6558
Joined  04-15-2006

Hi Mark,

Sorry to be a pain on this again. I was just wondering why you chose to write the tag as :

{exp:translator:simple}

instead of :

PLEASE NOTE THE CODE SHOWN BELOW IS NOT THE CORRECT CODE

{exp:simple:translator}

Just thought that it might be easier to remember in that way as it is the name of the extension?

I could be sleeping whilst writing this though so if there is a reason for it then please don’t feel bad in telling me even if it is blatantly obvious as my head sometimes stops working every now and then and just needs a slight kick-start to get it going again!! grin

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 12 May 2007 01:30 PM   [ Ignore ]   [ # 59 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15380
Joined  05-15-2004

Actually, this top-down approach is quite common in software, and particular programming. This leaves room for {exp:translator:advanced} or similar, while still showing their common heritage or purpose, as it were.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 12 May 2007 04:00 PM   [ Ignore ]   [ # 60 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

@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.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 12 May 2007 04:40 PM   [ Ignore ]   [ # 61 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6558
Joined  04-15-2006

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!! grin
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!! grin

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

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 May 2007 10:41 PM   [ Ignore ]   [ # 62 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  12-09-2006

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.

Profile
 
 
Posted: 14 May 2007 05:33 AM   [ Ignore ]   [ # 63 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

@Agile Apricot

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

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 14 May 2007 10:19 AM   [ Ignore ]   [ # 64 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

@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.

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 14 May 2007 02:12 PM   [ Ignore ]   [ # 65 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6558
Joined  04-15-2006

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 grin

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!! grin grin

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 14 May 2007 02:20 PM   [ Ignore ]   [ # 66 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

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

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 16 May 2007 05:16 AM   [ Ignore ]   [ # 67 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6558
Joined  04-15-2006

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!!! grin grin

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 30 May 2007 12:24 PM   [ Ignore ]   [ # 68 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  12-09-2006
Mark Huot - 14 May 2007 10:19 AM

@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.

Profile
 
 
Posted: 06 June 2007 07:53 AM   [ Ignore ]   [ # 69 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  12-09-2006

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.

Profile
 
 
Posted: 06 June 2007 07:59 AM   [ Ignore ]   [ # 70 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  12-09-2006
textdriven - 06 June 2007 07:53 AM

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.

Profile
 
 
Posted: 06 June 2007 09:22 AM   [ Ignore ]   [ # 71 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

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}

 Signature 

================================================
    Mark Huot
    http://markhuot.com
================================================

Profile
 
 
Posted: 06 June 2007 10:49 AM   [ Ignore ]   [ # 72 ]  
Lab Assistant
RankRank
Total Posts:  281
Joined  12-09-2006

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”}

Profile
 
 
   
4 of 9
4
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64941 Total Logged-in Users: 68
Total Topics: 81917 Total Anonymous Users: 38
Total Replies: 440338 Total Guests: 299
Total Posts: 522255    
Members ( View Memberlist )