Parsel: A Mint Plug-in to Detect Language · 323 words posted 09/07/2005 10:24 AM

IMPORTANT UPDATE 01/26/2007: I’ve updated Parsel to support Mint 1.29. You can grab the new version on google code.

Do you ever wonder which language your site visitors use? Meet Parsel, a plug-in for Mint, Shaun Inman’s web statistics application.

What Parsel Does:

Parsel grabs HTTP_ACCEPT_LANGUAGE from the browser’s user agent string and saves it in the Mint database. You can view languages by most recent and most common.

How to Install Parsel

Limitations

If you have any suggestions or find any bugs, please post them in this thread. I’ll post a tutorial later today for writing your own simple plug-in.

UPDATE 7:23PM EST

I’ve updated Parsel to v0.0.2. Parsel now displays “human friendly” languages like “Spanish-Argentina” instead of “es-ar.” Grab the zip file and unzip it to your desktop. The files include a READ ME that gives quick and easy steps for installing from scratch or updating.

UPDATE 09/09/05 Noon EST

I’ve updated Parsel to v0.0.5. I’ve added to the list of supported languages and tweaked the database to prohibit nulls. If you’re upgrading from an older version of Parsle, please uninstall first.

UPDATE 09/12/05 9:43AM EST

I’ve updated Parsel to v0.0.8.

UPDATE 10/04/05 7:05PM EST

Parsel updated to support showing aggregates as percents.

If you encounter any problems, feel free to post them here in the comments. Thanks.

* * *


1. On Sep 7, 12:22 PM MT said:
Nice work!

Keep working on the human-friendly output. It’s perfectly useful as is, but aren’t we all about the extra touches? :) #

2. On Sep 7, 12:45 PM since1968 said:
Thank you Matt. The human-friendly output will come shortly, I just wanted to make sure at least one person looked @ this plug-in before I invested too much time. :-) #

3. On Sep 7, 06:19 PM Jeff Croft said:
Sweet! It works great! I agree with Matt, though—we need that human-friendly output. :)

Awesome job! #

4. On Sep 7, 07:33 PM since1968 said:
Thanks Jeff.

Parsel 0.0.2 now supports human friendly output. You can grab it from the updated link. #

5. On Sep 7, 07:40 PM Jeff Croft said:
Marc-

Great! I checked it out. It’s certainly well on it’s way, but I want to show you what I’m seeing. I’ll e-mail you a screenshot. Basically, I’m getting some languages repeated in slight variations, like this:

English (United States), English, q53
English (United States)45
English33

There may be nothing you can do about this, but I thought I’d point it out anyway.

Again, great work! #

6. On Sep 7, 08:35 PM since1968 said:
Thanks Jeff. I get the same thing. It’s a question of how much it’s worth it to clean up what a user’s browser says. For instance, a US install of Firefox by default supports both en-us AND en, which is what you see in the first line you posted above. This generates a different result from a browser that supports only en-us, which is what appears on the second line.

If enough people are interested in the extension, I could see adding a preference, something like “group similar languages (exclude localization).” #

7. On Sep 7, 09:03 PM Hisyam said:
my mint’s preferences pepper page goes blank when i put your folder in the pepper folder. yes i’ve renamed them. #

8. On Sep 7, 09:12 PM since1968 said:
Thanks Hisyam.

Can you tell me which version of Mint you’re running: v104, v102?

Does the problem resolve when you delete the folder /parsel ? #

9. On Sep 7, 10:13 PM Hisyam said:
v104 #

10. On Sep 7, 10:54 PM since1968 said:
Did you install Parsel prior to upgrading to v104? I’ve had trouble with 3rd party Pepper plug-ins and upgrades. What I’ve found safest is to export my sql data, reinstall the current version from scratch, and then add non-core Pepper plug-ins. #

11. On Sep 8, 12:38 AM Hisyam said:
I couldn’t even instal Parsel because the preferences pepper side is blank.
I installed v104 after that I put the parsel folder in since1968 folder. how do i export your sql data? which table? #

12. On Sep 8, 12:46 AM Hisyam said:
oh, and yes, the problem resolve when i delete the since1968 folder #

13. On Sep 8, 08:04 AM since1968 said:
Hisyam, Mint stores your referer data in a table called mint_visit. You can export it for backup if you have access to PHPMyAdmin. #

14. On Sep 9, 12:01 PM LionHeart said:
No way to install it on the new v106 :( #

15. On Sep 9, 12:46 PM since1968 said:
LionHeart, can you give me more information? Are you getting an error when you try to install? Thanks for any details. I have Parsel running on Mint v106. #

16. On Sep 10, 09:31 AM Davr said:
nice! #

17. On Sep 10, 11:29 AM since1968 said:
Thank you Dave. #