Figure localisation for pdf and ebooks

This implements the ability to provide figure localisation in pdf and ebooks. It  has been tested on french for localization and english for default fallback. It needs some more reviewing to check if this works for other languages.