added support default_language
fixed encode logic