You can do it based on browser language via .htaccess, but the issue is whether browser language is accurate enough for what you want to do with your traffic.
If its just being used to block .jp traffic, then htaccess probably is sufficient. If you wanna redirect lots of different countries to different page/show different content, then you need a proper script.
Hit me up richard {at} ip-sorter.com or icq 41012160 if you wanna chat about foreign country filtering / redirecting / targeting etc.
Check this url if you're happy with doing it in htaccess:
http://www.bowiesnyder.com/writings/nls_apache.htm