multilingual

adding a custom language to django

别来无恙 提交于 2019-12-02 02:21:26
I'm translating my website into the 24 languages of the European Union. These include the "Malti" language, that is not listed in django default supported languages. I would like to know if there is a way to add a custom language to django so it can work with the native i18n url function. Thanks! I found the solution, you have to manually add a folder in /django/conf/locale/ with the language extension you want. Actually you can just copy past the en (english) folder and name it after the missing language (in my case mt). In this folder you can also edit the file formats.py to localize the

What's the modern way to solve Plone deadlock issues?

痴心易碎 提交于 2019-12-02 01:43:11
I currently have a Plone 4.3.8 site where editing a portlet causes a deadlock. I'm trying to find tools to fix this, but most deadlock tools don't work & I'm not getting good information (IMO) from those that at least run. I've tried: z3c.deadlockdebugger => can't get to a stacktrace ZopeHealthWatcher => can't see the results on command line (or webpage) Products.LongRequestLogger => perhaps the best so far, gives me some log output - but it's stack traces focus on Diazo code, but the problem still occurs when Diazo isn't in scope (running against 127.0.0.1) gdb attach - just landed me in C

URL structure for multi-language site

99封情书 提交于 2019-12-01 23:44:29
I want to make a multi-language site, but I'm not sure what the best way is to deal with the URL structure from a SEO point of view. Some examples: Product example.com/product/123/en/product-name or example.com/product/123/product-name/en Or other? Category example.com/Category/en/furniture/chair/ or example.com/Category/en/120/chair/ or example.com/Category/en/chair/ Or other? unor (Ignoring the SEO aspect, as it’s off-topic on Stack Overflow.) Having the language tag as the first path segment is the most common convention. And it makes sense, especially if you translate the path (which you

Magento “Forgot Password” email sent in wrong language

限于喜欢 提交于 2019-12-01 21:04:24
问题 I have a Magento site with multiple languages. I have setup the language packs and everything seems to translate properly on the website. Also the transactional e-mails are sent in the correct language EXCEPT for the " Forgot Password " e-mail which is always sent in German. Here's what I did: Installed language packs and made sure all templates and folder structures are correct. Example: /app/locale/nl_NL/template/email/ Under System » Transactional Emails : I applied the template, chose the

Printing Bidi text to an image

允我心安 提交于 2019-12-01 19:59:00
问题 I have some code in Python using PIL, that will print UTF-8 characters to an image. I've noticed that for joining Bidi scripts like Arabic, the same code fails to connect characters correctly (the initial forms are only chosen, medial and final forms aren't utilized) Can anyone recommend a method or technique for solving this particular issue? 回答1: If you want to keep using PIL, use pyarabicshaping with pybidi or you might want to consider switching to pangocairo which uses HarfBuzz for text

Magento “Forgot Password” email sent in wrong language

耗尽温柔 提交于 2019-12-01 19:27:01
I have a Magento site with multiple languages. I have setup the language packs and everything seems to translate properly on the website. Also the transactional e-mails are sent in the correct language EXCEPT for the " Forgot Password " e-mail which is always sent in German. Here's what I did: Installed language packs and made sure all templates and folder structures are correct. Example: /app/locale/nl_NL/template/email/ Under System » Transactional Emails : I applied the template, chose the locale and saved. Then I went to System » Configuration » Sales Emails , I switched to each language

Printing Bidi text to an image

巧了我就是萌 提交于 2019-12-01 18:22:20
I have some code in Python using PIL, that will print UTF-8 characters to an image. I've noticed that for joining Bidi scripts like Arabic, the same code fails to connect characters correctly (the initial forms are only chosen, medial and final forms aren't utilized) Can anyone recommend a method or technique for solving this particular issue? If you want to keep using PIL, use pyarabicshaping with pybidi or you might want to consider switching to pangocairo which uses HarfBuzz for text shaping. What I did is the following: Python + Wand (Python Lib) +arabic_reshaper(Python Lib) +bidi

Best practice for URLs of multi-language websites

会有一股神秘感。 提交于 2019-12-01 16:38:52
What is considered the best strategy for URLs of translated websites? Something I see happen frequently is: http://example.com/english-slug.html http://example.com/de/english-slug.html http://example.com/fr/english-slug.html This has the (minor) advantage that a user can manually switch to another language by modifying the URL. The disadvantage seems to be that the URL consists of a slug in the wrong language for every page not in the default language. That would cause a SEO penalty, I think. The alternative would be to translate the slugs as well and optionally omit the language identifier as

Best way to implement multilanguage in PHP

♀尐吖头ヾ 提交于 2019-12-01 12:28:19
问题 I have multilanguage PHP system with over 30 languages. Each definition is made with define(): define('LN_loader_alt', 'Loading...'); And there is over 400 definitions. I made a little comparison and created abstract class Lang with over 400 constants and these constant are instead of define() of course, example: abstract class Lang{ const LN_loader_alt = 'Loading'; ... } Next I required both files and called 1 define and 1 const from class Lang. Next I made analysis with webgrind and results

Regular expression to validate name in .NET multilingual web application

烈酒焚心 提交于 2019-12-01 11:15:07
问题 how can i write a regular expression to validate name field in a multilingual web application, i want to validate the name field for non-English languages e.g. Spanish or German, and we need to make sure that no one enter digits or special characters. I'm using .NET 2.0 I believe we can't use expression as below for non-English language. ^[a-zA-Z]{1,20}$ Any help will be highly appreciated! I got this Regular Expression, it works fien when i uses Regex Builder but when i try it in actual web