How to specify your webpage’s language so Google Chrome doesn’t offer to translate it

Google Chrome currently requires several tags to make an (HTML5) document opt out of translation. Before doing this, you should be sure that you know your audience’s language, as otherwise it will prevent foreign sites from properly translating your site. The relevant tags are: <meta charset=”UTF-8″ /> <meta name=”google” content=”notranslate” /> <meta http-equiv=”Content-Language” content=”en_US” /> … Read more

What’s the best database structure to keep multilingual data? [duplicate]

Similar to method 3: [languages] id (int PK) code (varchar) [products] id (int PK) neutral_fields (mixed) [products_t] id (int FK) language (int FK) translated_fields (mixed) PRIMARY KEY: id,language So for each table, make another table (in my case with “_t” suffix) which holds the translated fields. When you SELECT * FROM products, simply … LEFT … Read more

React / Redux and Multilingual (Internationalization) Apps – Architecture

After trying quite a few solutions, I think I found one that works well and should be an idiomatic solution for React 0.14 (i.e. it doesn’t use mixins, but Higher Order Components) (edit: also perfectly fine with React 15 of course!). So here the solution, starting by the bottom (the individual components): The Component The … Read more

Best practice for localization and globalization of strings and labels [closed]

As far as I know, there’s a good library called localeplanet for Localization and Internationalization in JavaScript. Furthermore, I think it’s native and has no dependencies to other libraries (e.g. jQuery) Here’s the website of library: http://www.localeplanet.com/ Also look at this article by Mozilla, you can find very good method and algorithms for client-side translation: … Read more

When should I use ugettext_lazy?

gettext() vs. gettext_lazy() In definitions like forms or models you should use gettext_lazy because the code of this definitions is only executed once (mostly on django’s startup); gettext_lazy translates the strings in a lazy fashion, which means, eg. every time you access the name of an attribute on a model the string will be newly … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)