Powered by Cellfex RSS Follow me on Spotify

Archive for February, 2011

Instead of writing custom snippets for php headers its faster to redirect website visitor to “his” language by using .htaccess rewriting rules (mod_rewrite should be enabled though and certain permissions allowed for you to change htaccess directives)

so, lets imagine you already have language support on website by entering corresponding language as first argument in url:

http://yourdomain/en/index/ for english speaking visitors
http://yourdomain/fr/index/ for french speaking visitors

in order to redirect these visitors by default when they enter a site, you may write tricky cookies or PHP snippets that grab User Agent Language, but for me somehow this approach turned out to be cool enough in order not to make site engine not to support feature that is needed in one of 30 pages.

RewriteEngine on of course is already there since i already have user friendly url’s, so i add these lines to .htaccess

RewriteCond %{HTTP:Accept-Language} ^fr [NC]
RewriteRule ^$ fr/index/ [L,R=301]
RewriteRule ^$ en/index/ [L,R=301]

First line detects “Accept-Language” header in user agent and if it is “fr*” for any french speaking visitor, i redirect him to french site on second line.
Third line is a fallback for default English language site.

IF you dont have friendly url’s but want to start having some right now, then just add RewriteEngine on on .htaccess file in your site root.

RewriteEngine on
RewriteCond %{HTTP:Accept-Language} ^fr [NC]
RewriteRule ^$ index.php/?language=fr [L,R=301]
RewriteRule ^$ index.php/?language=en [L,R=301]

Htaccess is a tricky thing, so you might need additional Options but that goes beyond this post. Cheers!

23 Feb 2011

Htaccess redirect by user language

Author: Edgars | Filed under: DailyStuff, Web Development, htaccess

From KnowYourMobile.com I heard that “according to IHS, a worldwide research firm, Google’s Android Market has grown 861.5 per cent since 2009.”

Global Mobile Applications Store Ranking in 2010 and 2009
Ranking by revenue in Millions of U.S. Dollars

2010 Rank

Store

2009 Revenue

2009 Share

2010 Revenue

2010 Share

Growth

1 Apple App Store 769$ 92.8% 1,782$ 82.7% 131.9%
2 BlackBerry App World 36$ 4.3% 165$ 7.7% 360.3%
3 Nokia Ovi Store 13$ 1.5% 105$ 4.9% 719.4%
4 Google Android Market 11$ 1.3% 102$ 4.7% 861.5%
Total 828$ 100% 2,155$ 100% 160.2%

Source: IHS Screen Digest February 2011

by looking at these amazing numbers i think we should also make some mobile frontend for Cellfex that could use some common features.

22 Feb 2011

Why should all of us take mobile apps seriously

Author: Edgars | Filed under: DailyStuff

From the very beginning of e-ink i was waiting for something to substitute piles on notebooks (real notebooks, not laptop synonyms) on my desk. And since this is not 1st of april, i truly believe that this piece of wonder will really come out and i am more than sure that i will get one of those for christmas (because for christmas they promise colored versions of it).
I want it so bad (if its not a joke).

NoteSlate is low cost tablet device with true one colour display, real paper look design, long life battery (180h !), together with very handy usage and very simple and helpful interface for pen and paper. This easy, compact and portable gadget is used anywhere you want to make any notes, drafts, sketches, any ideas for future reference. Paper for everyone! Write a note and check it later, save it, or delete it. Maybe send it after. Just one colour is enough to express the basics.
- REAL PAPER look design

- ONE COLOR display

- ONE TOUCH ability just with pen / eraser

- 210x310x6mm thin body

- 13 inch matte monochrome eInk display

- 190x270mm active display, 750x1080pixels

- 180 hours battery life (almost 3 weeks of daily work !)

- 280 g weight !

- basic inputs: pen with eraser, USB mini, SD Card, Jack 3.5 mm, AC/DC 12V

- Wi-Fi module on request with order (no added charge (!)

- no web browsing !

- end price $99

- ONE POINT OF SALE – NoteSlate online e-store

Huge buzz around Nokia.
Nokia CEO Stephan Elop came out with a memo for employees with words about burnng platform and pouring gasoline on it.

“The first iPhone shipped in 2007, and we still don’t have a product that is close to their experience. Android came on the scene just over 2 years ago, and this week they took our leadership position in smartphone volumes. Unbelievable.”

Obviously something had to change since “primising” opensouce mobile platform MeeGo failed big time. So in huge dilemma of coping up with Android or Win7, Microsoft earned Nokia’s trust as a lifesaver.

Microsoft is an interesting choice since world here split in two sides – haters and lovers. Soon after two giants – Stephen Elop and Steve Ballmer announced an open letter, a short commentary came from Google –

Two turkeys do not make an eagle” Vic Gundotra, Vice-President of Engineering for Google

Either way, after few years of touchsmartphining i totally forgot of Nokia’s existence and in one moment realized that company that once was a synonym to “mobile phone” now is making phones just for “senior citizens”.

11 Feb 2011

Haven’t heard of Nokia for a while, heh?

Author: Edgars | Filed under: DailyStuff

Even in this asynchronous ajaxized world there is some use of iframes.
By default there is an ugly border around iframe, so to get rid of it you either set no border on css:
iframe {
border: 0 none;
}

Or use argument frameborder because the common border="0" will simply not work. If you want to know why they put frameborder for iframe and not border? Ask W3C.

8 Feb 2011

Remove iframe border

Author: Edgars | Filed under: HTML, Web Development