Thursday, January 15, 2009

Google Language API Round 2

Just a few days ago I Blogged about Google's Language API having character limitations which kind of makes the API almost useless to those with larges amounts of copy on their pages, say much more than 5000k characters.

Now after a bit of research and "farting" around with things, I found a solution that is available using today's amazing Ajax libraries.

JQuery, which just may be (in my eyes) the top dog of all the Ajax libraries available to the public with an Open-Source MIT-License has a tranlation plug-in available which can be found right here as well as some how to use it information along with bug issues and fixes. If you have any type of experience working with JQuery, you probably know how easy it is to develop some incredible web application features.

Here's what you need to do so you can implement Google's Language API and JQuery's Translation Plug-in onto your web site.

1. Start off by grabbing the zipped files here.
2. Create a new folder some where within your site or even create a new site directory.
3. Now create another directory for all the JQuery and unzip Language API into the newly created directory.
4. Now create a new page (HTML, Coldfusion, PHP, JSP or whatever you wish) or duplicate an already existing page within your web site so you can play around with the API.
5. Include all 4 scripts into the head of your page:
6. Now add a bunch of text to your page and I mean a bunch.
7. Pick a place for the language selector to be put and add a div with an id of jq-primaryNavigation.
8. Finally save your work and give it a go. If all goes as planned you should be able to translate any text inside the body of your web site just by selecting a language from the select list and have the selected language be remembered throughout the visit of your web site until your browser session is ended.

I found a couple things that put a cripple on both, Google's Language API and JQuery's Translation Plug-in.
1. This one actually goes along with many other Ajax Libraries. If you still use Adobe GoLive, don't even bother using any of the JavaScript features or scripts that GoLive generates for you. It just clashes with anything and everything.
2. Stay away from the menu maker widget called Menu Machine which again, is a plug-in for GoLive and again, causes all kinds of trouble. It's just a good idea to stay away from GoLive NO MATTER WHAT!
3. Google say's that you may need to have the meta equiv="Content-type" content="text/html; charset=utf-8" block in your source although it should be there in any sense.

I believe that's it! Hope I didn't forget anything. But if I did, please feel free to correct me as I'm sure all will do anyway and here's a working example for all to see and fiddle.

- Pete

The job that got away

Back in October of the recently archived 2008 I Blogged about trying to find something better, and in fact I "think" I did. After starting the hunt for a better something I came across what seems to be an amazing amount of openings for the price that I am in desperate need for. Some of these positions were out of the New Jersey range which would be nice but not really needed unless it was definitely something worth while. Some positions were located in South Carolina, Ohio, Chicago, Pennsylvania (Home), Virginia, and all the way to the top of the U.S. in Maine. Loving the cold weather and being fluent in the language of Philly, I would definitely call myself an East Coast guy.

As for finding somewhere nice to go, I thought that I had found the right place for me to call home and possibly even grow stronger in my career but I am gonna have to say that unfortunately I'm thinking it has all fallen through. Maybe I'm not the guy that they were looking for after all or maybe, just maybe this whole rotting economy deal is having an affect on this position.

All and all, I'm not going to let the stressing economy take over my career. The only thing that I can really do is just keep looking just like every other person in my position and I understand that very well.

- Pete

Tuesday, January 13, 2009

Touching up on the SQL

Yea, SQL, what a great language to know and know good. As a developer, you're pretty much expected to have experience with or even be fluent in SQL. As for myself personally, I love what you can do with the language because it just opens up so many more possibilities for online applicaton development.

Of coarse we all have our moments of staring at our screens trying to think why the primary key in table pID is having a bit of difficulty seeing it's foreign key in table oID or maybe. Or maybe ColdFusion seems to be throwing it's usual temper tantrum, saying no, you messed up some where no go find it or else you cannot continue. Maybe it's something completely redundant or something that was just overlooked. All in all it happens to the best of us and the cure for those days is to get up, walk away, and get your mind of off what in the world you were doing to clear you foggy little head.

Then you come back from a nice stroll through your office or where ever your happy place is and sit down, look at your code and BLAMO! You realize your mistake, correct it, and now ColdFusion's happy as well as yourself.

Are you stuck on something or having a brain fart? Give W3Schools a try, it's helpful when you're stuck on something.

- Pete

Monday, January 12, 2009

Googles Language API

Ever so recently I have been becoming quite acquainted with Google's kinda sorta new Language API at work. Many clients have been asking if it would be possible for their web pages to be translated on the fly, and yes, yes it is. There are a couple free widgets available that do the job, but do the job a bit sloppy. What I mean by sloppy is that once the page has been translated, it may display the text all over the place or have the translated page inside a frame dedicated to the service (I hate that, it's ugly). As for Google's Language API, you have control over certain aspects of the language translation except for one very important aspect that Google should address if they want this API to hit it big with developers. What is it you ask? It is a limit on the number of characters on a single page that can be translated and if you go over that limit your page renders blank and useless. Whats the limit total? Glad you asked, at first when the API was introduced it had a weak limit of 500 chars but was updated to 5000 which IS NOT even close to being enough. Please Google, boost that bad boy up serious or even kill the limit.

- Pete

Wednesday, January 7, 2009

Annoyance with Photoshop CS3

There's a feature in Photoshop CS3 that I happen to find annoying to the point of having to find out if I could get rid of the feature. It's not anything serious, just one of those things that was thought to be a time saver or a space saver. It is in fact the new menu feature that makes you click on a menu item to show all items on that menu. It's so annoying when you have to click show all items everytime you need to get to something 10 times or more in such a little perios of time. So I had to kill that feature, every last bit of it as soon as possible.

If the "Show all items" is getting on your last nerve as well, here's how to get rid of it and never see it again until you have to re-install Photoshop for some unknown reason or maybe you actually like the feature and would like it back.

Here's how:
Open Photoshop and once completely loaded click on the Window menu item on the main toolbar. Now travel to Keyboard Shortcuts and Menus. Now, you should have a dialog box containing a tree menu with several items that may look familiar. It is in fact the layout or sitemap or even tree map of Photoshops main toolbar. To show the contents of an item, just simply click the arrow next to the menu item or by double-clicking the menu item. Once you have revealed all the list items in that menu you may now click the visibility to the right of the pertaining item to show it forever. If you don't want to show an item just leave the visibility button blank. Once you have gone through the extensive list of Photoshop features, click OK to confirm your changes. Here's the biggie, make sure you save your workspace or else you may have to re-select all those menu items again which can take a bit of time to do. To save your Workspace do the following: Click Window then navigate to Workspace and select Save WorkSpace, and finally select a workspace to save it as or re-save it as a new workspace.

Doing all that should help you save some time and frame yourself from being annyoed by silly features that Adobe thinks their products should have.

- Pete