Added support for truncate function and i18n.

    * Added internationalization support.
    * Added truncate function for truncating a string from start to end.