After `explode(';', $i); ` , every element in `$langs` should look like `zh-TW` or `zh-tw`. `explode('-', $onelang); ` further divides it into `zh` and `TW`. We have to make sure `$temp[0]` is lowercase and `$temp[1]` is uppercase so that ownCloud could find the corresponding directory in l10n/ . And the underscore is concatenated in `$keyword = strtolower($temp[0]) . '_' . strtoupper($temp[1]);`