2 of 9
2
Simple Translator (formerly known as Another Language Switcher)
Posted: 09 May 2007 04:48 AM   [ Ignore ]   [ # 19 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

Oh no!  I’ll change it right away.  Sorry about that Cocoaholic.

 Signature 

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

Profile
 
 
Posted: 09 May 2007 04:52 AM   [ Ignore ]   [ # 20 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

No leave it, it’s fine.

Most people will probably use your extension anyway.

Maybe you could merge them wink

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 09 May 2007 05:04 AM   [ Ignore ]   [ # 21 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

I’ve since renamed this extension to ‘Simple Translator’ to avoid a conflict with Cocoaholic’s language switcher.

@Cocoaholic,

I decided against merging the two extensions because they serve two fairly separate purposes.  Yours works in the admin side of things (as far as I could tell) and mine on the front end, in the template side of things.  Keeping them separate should make both easier to support and develop for.  Plus, because you caught this early enough the 13 people who had already downloaded the extension shouldn’t be too troubled to update again.

 Signature 

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

Profile
 
 
Posted: 09 May 2007 05:12 AM   [ Ignore ]   [ # 22 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

What my extension does is change the ‘language’ variable (using a query) for logged in members.

This means that all templates affected by the language you chose in your Localization Setting will reflect the current language.

I’m talking about pages like:
- Advanced search
- Member List
- Profile pages etc.

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 09 May 2007 05:13 AM   [ Ignore ]   [ # 23 ]  
Grad Student
Rank
Total Posts:  34
Joined  01-11-2006

Hi,
Where can i find the link to the download?

Profile
 
 
Posted: 09 May 2007 05:18 AM   [ Ignore ]   [ # 24 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

@lincolnpixel,

It should be at the top of the thread.

@Cocoaholic,

Huh, we’ll that makes sense then.  Sort of as an aside, do those pages come with translations out of the box?  Or do you have to download additional language packs for EE to get those pages to translate?  I’ve never had a need to translate the admin side of things.

The problem right now with integrating the two extensions (which I’d like to do, now knowing how yours works a little better) is that I’m not using the built in EE list of available languages.  I’ll have to look into using those before I can integrate your feature.

 Signature 

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

Profile
 
 
Posted: 09 May 2007 05:22 AM   [ Ignore ]   [ # 25 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

Yes, the language packs take care of the translations.

But again, I am not talking about admin pages (although those are affected as well)
The pages I mentioned are Public pages!

smile

EDIT: Public pages, but the extension works for registered members only though. Read the WIKI article and you’ll understand why I made the extension in the first place.

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 09 May 2007 05:27 AM   [ Ignore ]   [ # 26 ]  
Grad Student
Rank
Total Posts:  34
Joined  01-11-2006

Mr Mark,
I’m getting this error..
Notice: Undefined offset: -1 in /home/crecondt/public_html/engine/extensions/ext.simple_translator.php on line 147

Notice: Uninitialized string offset: 0 in /home/crecondt/public_html/engine/extensions/ext.simple_translator.php on line 157
can you help, please.

Profile
 
 
Posted: 09 May 2007 05:45 AM   [ Ignore ]   [ # 27 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

@lincolnpixel,

Sorry about that.  It should be fixed now in 1.0.4. (silly warnings, for even sillier mistakes on my part)

@Cocoaholic,

I realize the profile pages are public, I just refer to them as Admin pages because they aren’t managed through the Template tab, you can’t place normal template tags in them and they are just a bear to work with.  I also read through the wiki article, and surely something like your extension is useful.  I’m looking into a way to tie the two extensions together and also use the language packs built for EE.

 Signature 

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

Profile
 
 
Posted: 09 May 2007 06:22 AM   [ Ignore ]   [ # 28 ]  
Grad Student
Rank
Total Posts:  34
Joined  01-11-2006

FIXED!!
Thanks, Mark

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

Great! Glad to hear it lincolnpixel.

 Signature 

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

Profile
 
 
Posted: 09 May 2007 06:51 AM   [ Ignore ]   [ # 30 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

Alright, version 1.0.5 should now switch the search and profile pages.  All you need to do is make sure your titles are named the same as the language packs.  For example if you have a language in your extension like this:

_fr:French

Then you’ll want to have a language pack named ‘French’.  Notice the capitals because case does matter.  Luckily, I’ve found that you can rename the language pack to be any case you want.

 Signature 

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

Profile
 
 
Posted: 09 May 2007 08:37 AM   [ Ignore ]   [ # 31 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15831
Joined  06-03-2002

1. Huh.  Very interesting, so if I don’t include the prefix it will be added automatically?  Or should I include exp_ and it will be changed to suit the installations needs?

The latter, exp_ is automatically replaced whatever the user’s prefix actually is, if their installation’s prefix differs.

 Signature 
Profile
MSG
 
 
Posted: 09 May 2007 08:40 AM   [ Ignore ]   [ # 32 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

I see.  Thanks.  Is this the same functionality for the Cookie Name, using `$FNS->set_cookie()`?

 Signature 

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

Profile
 
 
Posted: 09 May 2007 08:44 AM   [ Ignore ]   [ # 33 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15831
Joined  06-03-2002

Actually on cookies the prefix, domain, etc. are just added, not replaced.  So your cookies just use a descriptive name, something that will not potentially clash with other cookies or addons.  If you sent ‘mh_lang’ to the $FNS->set_cookie() method, it would create a cookie named ‘exp_mh_lang’, or ‘prefix_mh_lang’ if they have a different value set in that preference.

 Signature 
Profile
MSG
 
 
Posted: 09 May 2007 08:46 AM   [ Ignore ]   [ # 34 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

I see, thanks for clearing that up.

 Signature 

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

Profile
 
 
Posted: 09 May 2007 09:27 AM   [ Ignore ]   [ # 35 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  303
Joined  09-30-2003

hi - just saw this thread by way of Jambor-ee…. good stuff! I have a two language site that i did with a friend using his custom PHP code, and so we didn’t use EE. Now it looks like I’ll be able to use your extension to migrate to EE. Yet another project to look forward to! PS On our present setup we have the ENG / IT option at the top of all our pages and one can switch to either language from whatever current page one is viewing. Does your extension work the same way?
Cheers. and Many Thanks.

PS hope you and Cocoaholic can integrate your solutions as they sound like they extend the capabilities of yours….

Profile
 
 
Posted: 09 May 2007 10:00 AM   [ Ignore ]   [ # 36 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1184
Joined  01-05-2006

giovanni, it does work like your existing setup, i believe. and it also now integrates cocoaholic’s extension.  you can read more about that in the first post to this thread.

 Signature 

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

Profile
 
 
   
2 of 9
2
 
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: 64938 Total Logged-in Users: 54
Total Topics: 81909 Total Anonymous Users: 45
Total Replies: 440308 Total Guests: 295
Total Posts: 522217    
Members ( View Memberlist )