Hello,
I'm not really an expert, but I'm replying since no-one else did.
If the user request the translation zh-hk and a string isn't available, then I
think that it will fallback on another zh-, but I don't know which (but I think
you only have zh-hant, so presumably that will be it). Even if that isn't
working as I think it is, you could possibly copy the translation for zh-hant as
zh-hk and change the strings you want to change in the copy. This would have the
problem that you wouldn't automatically get updated translations from zh-hant
into zh-hk, but it would work alright.
I think it would be better just to experiment and see what it does.
Regards,
Antonis
Antonis Christofides
+30-6979924665 (mobile)
On 23/03/2022 08.32, Guan Zhang wrote:
Hi all:
I'm trying to help the developer of a Django-based webapp with adding
additional language support and have some quick questions regarding how it works.
The website initially only had Japanese text but now includes English
translations. We would like to add Chinese as well but not just Traditional
(zh-hant) and Simplified Chinese (zh-hans) but something more specific like
Hong Kong Chinese (zh-hk).
You'll have to excuse me since I'm not really a Django developer myself but I
did try to read as much as possible regarding how Internationalization and
Localization works but from my understanding,
https://github.com/django/django/blob/main/django/conf/global_settings.py provides
languages that Django provides translations for, out of the box, but it's
possible to add your own language (in this case zh-hk). We don't really want
to re-translate everything or make the code overly complex and honestly most
of the text should be the same as zh-hant but we just want to provide some
exceptions. Is it possible to just include certain text in zh-hk and the rest
just let it fall back to zh-hant?
Please feel free to point me to some other documentations or even examples
that deals with this specifically, I will gladly review those.
Oh in case anybody is interested, this is the webapp in question:
https://gundam-data.herokuapp.com/uce/
We are currently managing the text to be translated via a Google Sheet and
once we've gotten everything we will get it compiled and pushed out to the webapp.
Thanks in advance for any tips/feedback on this!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/b628cc82-c794-414e-bf88-7155ead2b52cn%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/b628cc82-c794-414e-bf88-7155ead2b52cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/1ab5cbaa-4b44-c5e8-3967-8adfa65ff650%40antonischristofides.com.