fix bugs and add dynamic menu support and locale.