Conditional API Documentation

I was just reading a post at Mindtouch on having conditional documentation using MindTouch TCS. MindTouch TCS is a social knowledge-base, that can be used in building help systems and support communities.

The post made me think about the API space and smart API documentation like Posterous, and Masherys new I/O docs for APIs. These are all approaches to making documentation more intelligent and personalized to whoever is reading the documentation.

Masherys I/O docs, and smart API documentation allow developers to make API calls from within the documentation, making learning about APIs more interactive. This is a great approach to help developers learn about APIs, but I think we can go even further.

Can we make API documentation even more personalized? Can my API documentation know which language I'm using? Can code samples be in my native language? Should the documentation automatically know whether I'm making a web or mobile app?

The information needed to make the documentation smarter could be gathered when developers apply for an application key. Then documentation can then be dynamically tailored specifically for each application.

Quality API documenation is a huge stumbling point for many developers. How can we make documentation better meet developers needs? Where else can we personalize the APIdocumentationexperience?