internationalization

How to insert latin characters into Mysql from the command line shell?

試著忘記壹切 提交于 2020-01-26 02:57:06
问题 Why can't I insert the word Español via the command line mysql program ? See session below. mysql> select CONCAT( 'Espa', 0xF1, 'ol' ); +------------------------------+ | CONCAT( 'Espa', 0xF1, 'ol' ) | +------------------------------+ | Español | +------------------------------+ 1 row in set (0.00 sec) mysql> create table t > ( > nom varchar(25) NOT NULL > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; mysql> insert into t VALUES( CONCAT( 'Espa', 0xF1, 'ol' ) ); Query OK, 1 row affected, 1 warning (0

Why is Django only showing some of my translations

送分小仙女□ 提交于 2020-01-25 03:09:14
问题 I've got a site with translation strings in both the HTML templates and the views.py , forms.py and models.py files. Django has created the django.po file for my second language, and I have entered most of the translations. However, only translations in my .html and view.py files are showing up on the site. the others are being ignored it seems (models.py, forms.py - both defaulting to English) What's going on? I've obviously compiled my django.mo file and that's working - otherwise a lot of

Automatic, soft hyphenation in CSS

六月ゝ 毕业季﹏ 提交于 2020-01-25 00:04:47
问题 In December last year, CSS3 Hyphens support supposedly came to Chrome . Also, IE should be on board, in addition to other major browsers. Update: Upon receiving the answers below, I understand that I misinterpreted the footnote on caniuse.com. It says: 'Only supports the auto value on Mac for now' . I interpreted this as meaning 'On the Mac, only the auto value is supported for now' . But what is really meant is 'The Mac is the only platform where the auto value is supported for now' .

How do I disable default translation values in Django?

ε祈祈猫儿з 提交于 2020-01-24 10:05:39
问题 Some Tags give me translated Words without setting up the *.po file. {% trans "groups" %} {% trans "users" %} Unfortunately they won't be overridden when creating the *.po file and running: django-admin.py compilemessages So how do I get rid of the default translations ? I would prefer a solution on project level, because I don't want to modify Django core files. 回答1: There are several ways to override it set your locale path in LOCALE_PATHS in settings file, this gives your translations

How do I disable default translation values in Django?

蹲街弑〆低调 提交于 2020-01-24 10:03:10
问题 Some Tags give me translated Words without setting up the *.po file. {% trans "groups" %} {% trans "users" %} Unfortunately they won't be overridden when creating the *.po file and running: django-admin.py compilemessages So how do I get rid of the default translations ? I would prefer a solution on project level, because I don't want to modify Django core files. 回答1: There are several ways to override it set your locale path in LOCALE_PATHS in settings file, this gives your translations

Rails: How should Phusion Passenger and I18n.locale behave?

只谈情不闲聊 提交于 2020-01-24 09:33:21
问题 I have a Rails 2.2 web app running on Passenger / REE I set the default locale in config/environment.rb config.i18n.default_locale = 'en-GB' The first request seems to have no locale set in I18n.locale If I the visit a page with a before_filter that sets I18n.locale every subsequent visit to any controller even if it doesn't have that same before_filter setting the I18n.locale get an I18n.locale of whatever was set, say, en-US . On Mongrel with the same code each request gets a locale of en

Internationalization on database level

守給你的承諾、 提交于 2020-01-24 05:53:07
问题 Could anyone point me to some patterns addressing internationalization on the database level tasks? The simplest way would be to add a text column for every language for every text column, but that is somehow smelly - really i want to have ability to add supported languages dynamically. The solution i'm coming to is one main language that is saved in the model and a dictionary entity that gets queried for translations and saved translations to. All i want is to hear from other people who have

How to use globalize and sunspot in rails 4

不羁的心 提交于 2020-01-24 04:30:06
问题 How do i index arabic profile translations with sunspot solr. Can i use globalize and sunspot or should use some other approach? models/profile.rb translates :name, :description validates :name validates :description searchable do text :name text :description end 回答1: You can define separate fields for each of your locales in your search block: I18n.available_locales.each do |locale| # Separate name field for each locale text "name_#{locale}".to_sym do # read_Attribute is defined by Globalize

Localize an attribute with l20n

元气小坏坏 提交于 2020-01-24 02:54:07
问题 I'd like to localize a placeholder attribute with L20N. I can't find anything in their documentation, and doing this (unsurprisingly) doesn't work. <input type="text" data-l10n-id="email" /> 回答1: A normal translation (meaning you want to replace the content) is written like this: <test "this is a translated text"> You can then translate attributes like this: <test "this is a translated text" title:"this is the title"> In your case, you only want the attribute, so this will work: <test

Django missing translation of some strings. Any idea why?

我的梦境 提交于 2020-01-23 05:35:24
问题 I have a medium sized Django project, (running on AppEngine if it makes any difference), and have all the strings living in .po files like they should. I'm seeing strange behavior where certain strings just don't translate. They show up in the .po file when I run make_messages, with the correct file locations marked where my {% trans %} tags are. The translations are in place and look correct compared to other strings on either side of them. But when I display the page in question, about 1/4