havok89 / Hoosk

Hoosk Codeigniter CMS
http://hoosk.org
Other
128 stars 87 forks source link

About dashboard translating #22

Closed sashiba042 closed 7 years ago

sashiba042 commented 7 years ago

Hi, my first post at github.

I was translating the dashboard step by step through your tutorial, but the dashboard always displayed in english. Found out that there's a backslash at the end of each language name in the setting page(and in the database, of course, ex. 'english\', 'traditional_chinese\'). This might cause problem when Lang.php(hoosk\system\core\Lang.php) preg_match the string around line 110. I currently change the match pattern from preg_match('/^[a-z_-]+$/i', $idiom) to preg_match('/^[a-z_-]+(\\\\)*$/i', $idiom), and it works so far. Thx for the great framework!

havok89 commented 7 years ago

Hey, I have removed the extra slash in the latest version.

Thanks for bringing it to my attention!