Add getString and getEntity to Compiler.Entity
Better logic for getLocale