internationalization

GWT validation framework internationalization for messages in annotations

僤鯓⒐⒋嵵緔 提交于 2020-01-15 12:12:40
问题 After having read this page I found a way of internationalizing validation messages. It is done by placing translations of each error type into ValidationMessages.properties files. javax.validation.constraints.Size.message=The property must be between {min} and {max} javax.validation.constraints.NotNull.message=The property must not be null It is error type-specific and it's not what I need in my app. I need a unique message for each of my fields in validated beans. With no

Programatically compile languages with js-lingui

廉价感情. 提交于 2020-01-15 11:58:21
问题 I recently tried to integrate js-lingui into my react project. The tricky part I can't get right is compiling my languages to js files. My goal is as follows: I will assemble my languages trough some task running (gulp or webpack maybe). This is as easy as walking trough my project, and outputting appropiate json files. However, to use these files they have to be compiled via js-lingui. And I don't know how to do this. I am aware of lingui-cli , which allows me to do this on the cli, but I'm

serving i18n js using babel, django, & jinja2

▼魔方 西西 提交于 2020-01-15 10:43:37
问题 Using django, with jinja2 for rendering & babel for message extraction I have some js files that need to be internationalized. I haven't been able to figure out a syntax for extracting messages from them which would also let jinja2 render them. Either jinja2 has to learn to read an extractable syntax, or I have to extract from something jinja2 can render. (Or, do this another way entirely) Extracting If I mark messages in the js with gettext('message') It extracts just fine. Rendering But

Permission denied in Django makemessages

断了今生、忘了曾经 提交于 2020-01-15 10:13:18
问题 I'm trying to add i8n into a Django app, but when I execute: (venv) user@machine:~/path/to/repo$ django-admin makemessages -l es The next error is thrown: PermissionError: [Errno 13] Permission denied: './venv/lib/python3.5/site-packages/Jinja2-2.9.5.dist-info/LICENSE.txt.py' But if I use it with manage.py instead of django-admin it works correctly. In django documentation they recommend to use django-admin. Any ideas? 回答1: Django's doc does not really "recommand" to use django-admin instead

How to translate ng-bootstrap input date-picker - NgbInputDatepicker i18n?

老子叫甜甜 提交于 2020-01-15 09:36:47
问题 We are using the 'ng-bootstrap' date picker input component. While the date-picker itself can be translated using NgbDatepickerI18n according to the example at this plnkr, the input date picker uses the NgbInputDatepicker directive. How can this directive be translated using the same services that are used for translating the date-picker? 回答1: You would use the exact same way. The NgbInputDatepicker, when toggled, displays an NgbDatepicker, which gets its labels from a service. 来源: https:/

i18n performance: resx vs. database?

牧云@^-^@ 提交于 2020-01-15 06:30:06
问题 Question: I'm asking myself whether I should use .resx files or a database to localize my ASP.NET MVC 3 application. I use a database anyway, so there's no additional effort required for a data-access layer. I know I can do both, but I'm a bit worried about performance... Is it a good idea loading the DB with additional translation work, whereas this could be done by the webserver ? Or is reading the .resx files much slower than using a database ? Also, it seems to me that the .resx-file way

express3-handlebars and 18next-node - internationalisation based on page?

送分小仙女□ 提交于 2020-01-15 05:00:12
问题 my first question here - please go easy. I'm using express, express3-handlebars and i18next-node with node.js The plan is to work with a different translation namespace depending on which view (i.e. which handlebars file) is currently being served. So if we're looking at the page called ie(.hbs), i18next will look in the namespace called ie(.json) for the relevant language. This makes organisation and coordination of translations easier. This is how I'm currently doing it: first I send the

How to load a javascript i18n properties file in spring?

。_饼干妹妹 提交于 2020-01-15 04:24:29
问题 I need javascript i18n in my web application which is based on Spring MVC. For javascript 18n I am using jQuery.i18n.properties and the URL where I found it is http://code.google.com/p/jquery-i18n-properties/ When I run a sample application, it works properly but when I integrate it in my application it does not work. Basically my javascript code is not able to load the js properties files. When I show a alert using keys, it always shows key but not the key values. Here is my project

Should logging be affected by Internationalisation?

时光总嘲笑我的痴心妄想 提交于 2020-01-14 12:56:26
问题 We are currently looking into shipping our set of products to other parts of the world. We will be ensuring that all strings and date formats,etc in the user interfaces reflect the language and culture of the target country. Should our log files and error reporting also be changed in this way? Considering the customers may dip into the log files or we may have a support team local to that country, troubleshooting and reporting of problems would be made easier if the relevant reports were in

Unicode filenames on Windows in Ruby

陌路散爱 提交于 2020-01-14 07:27:26
问题 I have a piece of code that looks like this: Dir.new(path).each do |entry| puts entry end The problem comes when I have a file named こんにちは世界.txt in the directory that I list. On a Windows 7 machine I get the output: ???????.txt From googling around, properly reading this filename on windows seems to be an impossible task. Any suggestions? 回答1: You're out of luck with pure ruby (either 1.8 or 1.9.1) since it uses the ANSI versions of the Windows API. It seems like Ruby 1.9.2 will support