Making menu items active on desired page I am creating a custom module for menus through which we can allow individual menu link to be active on desired path/paths. The module interface provides similar functionality as block module's visibility configuration.

I am using hook_translated_menu_link() to implement the visibility functionality. As I have referred menu item visibility module for this, but not getting the desired output. Do i need to implement any other hook for this or I am missing out something. As I have implemented hook_form_id_form_alter() for the interface and mymodule_submit() for form submit functionality and right now trying out hook_translated_menu_link() for visibility functionality.  I also have a database entry for my module.
Is there a way you could make the Context module a dependency for your module and hook into the Context module to do this?  Context already allows you to do this exact function.  You specify conditions and reactions when those conditions are met, per context.  In your case you would specify particular paths as conditions, and then your reaction would be to simply activate a particular menu item.  I would seriously consider checking it out rather than reinventing the wheel.