wagtail / wagtail-localize

Translation plugin for Wagtail CMS
https://wagtail-localize.org/
Other
222 stars 84 forks source link

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

Closed farahOueidat closed 11 months ago

farahOueidat commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

zerolab commented 1 year ago

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 commented 11 months ago

localize 1.5.x supports Django 4.2 with Wagtail 5.0+