-
Notifications
You must be signed in to change notification settings - Fork 29
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
A Minor Drawback #10
Comments
Hi, thanks for reporting! |
eg. The default language code is "en". Trying to access |
Ah, agree, that make sense |
One note: If prefix with default language code is present in url, exactly that language will be rendered, redirect will not occur. |
@jmp0xf i've added some settings to control default language prefix behaviour #12 . |
it seems that it cannot work properly with |
Precise, what behaviour do you expect and what you get? |
it is able to show the page in proper language when |
You mean, when
url I don't think, that by accessing to url |
Of course the actual strategy is a personal opinion. However, changing preferred language in terms of language prefix in url is the behaviour for non-default language prefix. I think it is better to keep consistent. |
Preferred language is never changed implicitly. If i understand you correctly, you mean that by accessing url with non-default language prefix, i.e. solid-i18n follows this strategy, except when both settings |
My fault, the url with language prefix does not change the language setting, and yes, it should not do that. The actual problem annoying me lies in reversing named URLs in my observation. With |
My problem lies in if language_code != settings.LANGUAGE_CODE:
regex = '^%s/' % language_code
elif getattr(settings, 'SOLID_I18N_HANDLE_DEFAULT_PREFIX', False):
regex = '(?:^%s/)?' % language_code
else:
regex = '' If I change it to if language_code != settings.LANGUAGE_CODE:
regex = '^%s/' % language_code
elif getattr(settings, 'SOLID_I18N_HANDLE_DEFAULT_PREFIX', False):
regex = '^%s/' % language_code
else:
regex = '' Everything goes fine. |
|
By the way, this code:
will respond 404 for root urls (without language prefix), if |
Yes, I was trying to say "when make request to url without language prefix, reverse all other urls without prefix and we request url with default language prefix, reverse all other urls with default language prefix" |
If
SOLID_I18N_USE_REDIRECTS
is set to beTrue
, the url containing default language code would be unable to route, which is not a friendly behaviour in my opinion.The text was updated successfully, but these errors were encountered: