internationalization

Twig: Working internationalization (i18n) example

我的未来我决定 提交于 2019-12-03 11:19:06
I am looking for a working i18n example for Twig (the template engine). Documentation is a bit sparse when it comes to language files. Where should they go, how should they look and what should they be named? I have been trying with .po/.mo files, no luck. If someone could point me in the right direction... See: the i18n extension example which does not really tell me much about the language files themselves. Note: I want to use Twig on its own, not as part of Symfony. Here is my php-file: <?php header('Content-Type: text/html; charset=utf-8'); $vars = array(); foreach($_POST as $key => $value

What are some good non-English phrases with singular and plural forms that can be used to test an internationalization and localization library?

删除回忆录丶 提交于 2019-12-03 10:48:08
问题 I've been working on a .NET library to assist with internationalization of an application. It's written in C#, called SmartFormat , and is open-source on GitHub. It contains Grammatical Number rules for multiple languages that determine the correct singular/plural form based on the template and locale. The rules were obtained from Unicode Language Plural Rules. When translating a phrase that has words that depend on a quantity (such as nouns, verbs, and adjectives), you specify the multiple

Icelandic, utf8 and utf8x in LaTeX

老子叫甜甜 提交于 2019-12-03 10:20:06
First of all, what's the difference between utf8 and utf8x in \usepackage[utf8]{inputenc} \usepackage[utf8x]{inputenc} when used in LaTeX? Secondly, what packages are required when writing an article in Icelandic using LaTeX? I found: \usepackage[icelandic]{babel} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} after experimenting a bit but I have a feeling some part of the code may be redundant. And even with them the aforementioned packages, the code inside \begin{lstlisting} ... \end{lstlisting} isn't rendered with Icelandic characters when outputted through pdflatex in Ubuntu,

Best Practices for Internationalizing a Flex Application?

∥☆過路亽.° 提交于 2019-12-03 10:07:45
问题 I am looking into internationalizing a Flex application I am working on and I am curious if there are any best practices or recommendations for doing so. Googling for such information results in a handful of small articles and blog posts, each about doing it differently, and the advantages and disadvantages are not exactly clear. Edited to narrow scope: Need to support only two languages (en_CA and fr_CA) Need to be able to switch at runtime 回答1: Of course, after googling a bit more I come

Facebook Open Graph locale for Australia

痴心易碎 提交于 2019-12-03 09:58:35
I am trying to add the og:locale tag for an Australian website and Facebook's linter tells me that I have an error. Based on the documentation (and assuming what the correct content should be), I have added this to my page head: <meta property="og:locale" content="en_AU" /> Facebook's linter ( http://developers.facebook.com/tools/debug ) tells me: Object Invalid Value Object at URL ' http://foo ' of type 'website' is invalid because the given value 'en_au' for property 'og:locale:locale' could not be parsed as type 'enum'. What's going on here? Is en_AU not the correct code for australia? I

Process for localization of Delphi 2009 app by volunteer translators?

馋奶兔 提交于 2019-12-03 09:57:31
问题 I have a freeware scientific app that is used by thousands of people in nearly 100 countries. Many have offered to translate for free. Now that D2009 makes this easier (with integrated and external localization tools, plus native Unicode support) I'd like to make this happen for a few languages and steadily add as many as user energy will support. I'm thinking that I'll distribute a spreadsheet with a list of strings (dozens but not hundreds) to be translated, have them return it, and compare

Which ISO format should I use to store a user's language code?

蹲街弑〆低调 提交于 2019-12-03 09:42:51
Should I use ISO 639-1 (2-letter abbreviation) or ISO 639-2 (3 letter abbrv) to store a user's language code? Both are official standards, but which is the de facto standard in the development community? I think ISO 639-1 would be easier to remember, and is probably more popular for that reason, but thats just a guess. The site I'm building will have a separate site for the US, Brazil, Russia, China, & the UK. http://en.wikipedia.org/wiki/ISO_639 sorin You should use IETF language tags because they are already used for HTTP/HTML/XML and many other technologies. They are based on several

Rails: How to raise I18n translation is missing exceptions in the testing environment

十年热恋 提交于 2019-12-03 09:37:50
I want Rails to raise an exception when an I18n translation is missing in the testing environment (instead of rendering text 'translation missing'). Is there a simple way to achieve this? eloyesp To raise exceptions, you can define a class to handle localization errors. class TestExceptionLocalizationHandler def call(exception, locale, key, options) raise exception.to_exception end end Then you attach it to the desired test cases with I18n.exception_handler = TestExceptionLocalizationHandler.new This way you get exceptions raised. I don't know how to raise failures (with flunk) to get better

react-intl vs react-i18next for ReactJS internationalization (i18n) [closed]

心已入冬 提交于 2019-12-03 09:28:14
I need to build a multilanguage application using ReactJS. The application needs a custom dictionary for different languages as well as automatic formatting of date/time, numbers and currency. From all I´ve seen there are 2 very popular libraries: reac-intl and react-i18next What would be the advantages between one and another ? What is the most supported and popular one ? What is the general choice for a ReactJS application supporting multiple languages ? jamuhl @whyp's response is not taking into account react-i18next is part of i18next which has additional 2100 stars (without having a huge

Best practice for key values in translation files

余生颓废 提交于 2019-12-03 08:26:51
问题 In general, translation methods take a key > value mapping and use the key to transform that into a value. Now I recognize two different methods to name your translation keys and within my team we do not come to consensus what seems to be the best method. Method 1: Use full English words or sentences: Name => Name Please enter your email address => Please enter your email address Method 2: Use keywords describing the situation: NAME => Name ENTER_EMAIL => Please enter your email address I