-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slight annoyance with the languages #110
Comments
@waifung0207 @angelxaces I am unable to switch among two languages and translate default menu. This is default url: http://localhost/study/en/ when I switch language by staying on another page like url: http://localhost/study/zh/about-us and I get page not found error, plus it does not translate the menu: $lang['about_us'] = "关于我们"; or $lang['home'] = "主页"; Can you please help me in this? |
@Nouman24 In the original Master branch the URL always has the language appended to the end of the URL string. This means that: If you're interested:
and then have /application/core/MY_Controller.php collect the language from session instead of the URL. But then, in the same file, you have to recode the part that self-references the URL as well as the RegEx expression(s) in /application/config/routes.php but the result is that you no longer have the language url-segment interfering with linkage
|
First off I totally support the incorporation of languages on this as it's probably allowed more people to contribute. So I don't think it should be taken out. I needed it to toggle off and on though and the problem lies in passing the variable through the uri. The /en/ wasn't something I was fond of having all the time but depending on how you disable it you'll end up with the correct url but the /en will still get appended to file downloads.
My fix was to pass it with sessions or cookies but another way that is similar to the current method would be to pass it using the CodeIgniter's GET array. It's practically the same thing but it doesn't manipulate the URL.
The text was updated successfully, but these errors were encountered: