Currently the opt-out feature is only available by iframe and text from piwik lang. By having different customers using one piwik instance it would be a very handy feature to be able to customize the css-style and default-texts by offering more flexible solutions.
May be it could be possible to inject custom text and css-styles using GET-params? A much cleaner solution would be to offer an PHP-API Method triggering the cookie on/off and another one reading the current state as plain boolean to integrate such things as custom PHP f.e. by using AJAX to trigger the server-side skript triggering the Piwik API.
The current solution to change texts/style by adapting the template is not very suitable as this always will affect all customers/instances of a piwik-instance and changes may get lost by running an software-update on Piwik.
There is a plugin which lets you adapt the css per site over the administration interface http://plugins.piwik.org/customoptout Concerning the language I agree it would be handy to have another plugin or even better, as you described, an API to include it smoother in the own design flow
Thanks for the hint! I also found that in the meantime and used it as "workaround".
By the way for custom-opt-out I figured out that is important to add special headers for Internet Explorer. It was hard to figure out why it did work in chrome and other browser, but did not in Safari/Internet Explorer until I set P3P Headers (see #3135).
I honestly still think there should be an API :) but same here, I don't see it urgent but if I have some spare-time, we'll see.