I want to write a script to firefox that in the moment I start to write address in the addressbar it change the language to the one I'll choose (in the add-on).How do I do it?
A:
Assuming that by "change the language to the one I'll choose" you mean changing the OS input language, you'd do it by:
- Learning the basics
- Searching for details of working with the Location bar and reviewing previous answers on this topic
- Finally, for actually switching the input language you'll have to talk to the OS directly, there's no API in the platform for that. You could use ctypes for that if you developed for future Firefox versions; otherwise you'd have to write an XPCOM component in C++ (which is more complicated) or resort to launching an external program for that (which would probably not work well).
Nickolay
2010-05-07 09:09:13