Translate class based on mysql database