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.
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.
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!
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.
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.
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.
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.
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.
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….
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.