Skip to content
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

wagtail localize does not support Kurdish and central Kurdish languages #695

Closed
farahOueidat opened this issue May 16, 2023 · 5 comments
Closed

Comments

@farahOueidat
Copy link

To translate the website's content into English, Arabic, and Central Kurdish, I'm using wagtail Localize. While Arabic and English function properly, Central Kurdish redirects to /en/ckb and throws a 404 error. Could you kindly assist me in fixing this problem?

@zerolab
Copy link
Collaborator

zerolab commented May 16, 2023

Hi @farahOueidat,

This doesn't enough information for any help. How did you set up your project? Did you follow the instructions on https://www.wagtail-localize.org/tutorial/2-configure-wagtail-localize/ ?

How did you define WAGTAIL_CONTENT_LANGUAGES, LANGUAGES, the relevant bits for INSTALLED_APPS, MIDDLEWARE, url patterns?

Could you reproduce this with a minimal project (wagtail start + add at least a text field to the HomePage model)?

@farahOueidat
Copy link
Author

farahOueidat commented May 17, 2023

I appreciate your quick reply,
I did follow the Wagtail localize instructions.
English and Arabic are functional, only the ckb central kurdish redirect to /en/ckb.
image

WAGTAIL_CONTENT_LANGUAGES :
Capture1

INSTALLED_APPS
image

MIDDLEWARE
image

url patterns
image

@farahOueidat
Copy link
Author

Django version 4.2 now includes the Central Kurdish (ckb) language, although Wagtail Localize does not support it.

@zerolab
Copy link
Collaborator

zerolab commented May 17, 2023

We have #692 attempting to change that. I should have a bit of time in the coming days to look into this.

As a workaround you could look at writing a custom middleware based on Django's LocaleMiddleware to add the additional logic to get the language from path (https://github.com/django/django/blob/stable/4.1.x/django/utils/translation/trans_real.py#L492)

@zerolab
Copy link
Collaborator

zerolab commented Oct 6, 2023

localize 1.5.x supports Django 4.2 with Wagtail 5.0+

@zerolab zerolab closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants