add code from optl10n branch