internationalization

Django's I18N with third-party apps

人走茶凉 提交于 2019-12-05 15:42:44
问题 I have a Django project which uses django-tagging and is supposed to run in German. So I looked into the sources and found that django-tagging does indeed use gettext_lazy and is thus completely translatable. However, there are no translations available in the package. So I assume there must be a way for me to translate it from within my project. In other words, I expect ./manage.py makemessages -a to include untranslated strings from django-tagging , but apparently I'm wrong to expect that.

SQL Server: Must numbers all be specified with latin numeral digits?

回眸只為那壹抹淺笑 提交于 2019-12-05 15:01:05
Does SQL server expect numbers to be specified with digits from the latin alphabet, e.g.: 0123456789 Is it valid to give SQL Server digits in other alphabets? Rosetta Stone: Latin: 01234567890 Arabic: ٠١٢٣٤٥٦٧٨٩ Bengali: ০১২৩৪৫৬৭৮৯ i know that the client (ADO) will convert 8-bit strings to 16-bit unicode strings using the current culture. But the client is also converting numbers to strings using their current culture, e.g.: SELECT * FROM Inventory WHERE Quantity > ২৩৪,৭৮ Which throws SQL Server for fits. i know that the server/database has it's defined code page and locale, but that is for

Django Translation not working even with LOCALE_PATHS

我的梦境 提交于 2019-12-05 13:46:01
So I'm using django 1.8 to create a new web site that has to be translated into portuguese. So to use django's own tools I added to my middlewares: 'django.middleware.locale.LocaleMiddleware', I also added to my context_processors: 'django.template.context_processors.i18n', and the i configure my language settings: USE_I18N = True gettext = lambda s: s LANGUAGE_CODE = 'en' LOCALE_PATHS = ( os.path.join(BASE_DIR, 'locale'), ) print LOCALE_PATHS LANGUAGES = ( ('pt-br', gettext('Portuguese')), ('en', gettext('English')), ) TIME_ZONE = 'America/Sao_Paulo' USE_L10N = True USE_TZ = True I also have

How to organize Java properties entries for internationalization?

北城以北 提交于 2019-12-05 13:43:24
In our app we have a messages.properties file which contains all of the strings that will be shown to the UI. We have a small app with a few screens and it's already getting unwieldy with duplicate string values throughout. Right now we have it organized with page specific strings separated out with whitespace and comments, with a section for each jsp with the property name having a prefix of the page name. We also have sections for entities, for instance, anywhere we show the user's email address, we would reference the property user.email for the label for that input or output field. We have

I18n in EmberJS (routing and in general)

无人久伴 提交于 2019-12-05 13:22:50
Does EmberJS support translated routes for internationalized apps? Or does it at least make it easy to extend it to support i18n routes? Anybody with experience with this? E.g. can the route string be somehow set dynamically from locale files? Also it would be cool when using Ember with Rails routing would not have to be specified twice... is that so? I'm new to Ember (currently evaluating js frameworks) but I assume in general with Rails one would simply specify very basic routes from within Rails and the rest in Ember? So there wouldn't be much duplication? Wonder if locale files from Rails

JSFs: commandLink as a parameter for outputFormat

为君一笑 提交于 2019-12-05 13:16:41
I'm in the process of internationalising some JSF files so am externalising strings (and the concatenation of strings using placeholders). I have very little experience with JSF (today and yesterday) so excuse me if there is an obviuos answer to my question! I have been using the h:outputFormat tag (and the f:param tag) successfully for simple placeholders but now I'm looking to replace a placeholder with a commandLink component. i.e. <h:outputFormat value="#{adminMsgs.scheduleUpdateLink} "> <h:commandLink value="#{adminMsgs.update}" action="refresh" /> </h:outputFormat> Properties file:

Use Symfony 2 component in non-Symfony project?

我与影子孤独终老i 提交于 2019-12-05 12:38:41
For getting XLIFF/2 support in PHP, in another answer , it was suggested to use the Symfony 2 Translation component. So I downloaded it from Github into a directory ../vendor/ and naively tried to use it: <?php require_once '../vendor/Symfony/Component/Translation/Translator.php'; require_once '../vendor/Symfony/Component/Translation/MessageSelector.php'; require_once '../vendor/Symfony/Component/Translation/Loader/ArrayLoader.php'; use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\MessageSelector; use Symfony\Component\Translation\Loader\ArrayLoader; $translator

Displaying urdu characters in JTextPane

ぃ、小莉子 提交于 2019-12-05 12:31:48
How can I display a single Urdu character in a JTextPane ? I have translated English characters to Urdu characters. But I can't find any way to correctly display those characters into my text component. My goal is to: Get the key pressed on the keyboard. Convert that key into the equivalent Urdu character. Display it in my text component ( JTextPane ). I've completed step 1 and 2 but can't work out the last one. to 3- display it in my text component that is JTextPane source Wikipedia project Encoded in plain UTF-8 import javax.swing.*; import java.awt.*; public class Example { private JFrame

EL variable in JSF ResourceBundle

主宰稳场 提交于 2019-12-05 11:27:13
i read somewhere (don't find it anymore) that i can use EL Expresions in the resource bundle and then use it without changes in *.xhtml files. some.text=#{someBean.stepsLeft} more to switch the position of the variable in different languages. But actually it wont work. I can use Interpolator class to handle the parsing or add some.text.before some.text.after and let one of them empty. I would prefer it to use it without interpolator.interpolate() if possible. JSF resourcebundles does by default not resolve EL. It however by default supports MessageFormat API in combination with <h:outputFormat

Good way to provide Rails-way i18n support in Django

安稳与你 提交于 2019-12-05 11:19:33
There's one thing in (new) Rails I envy: internationalization support (Django has one too, but I prefer Rails' flavour). The key difference between Rails' and Django's approaches is what kind of string behaves like keys in key-value translation mapping, i.e. Django version (keys - strings in "main" language, for example english): msgid "Save and quit" msgstr "Zapisz i wyjdź" Rails version equivalent (keys - abstract strings; standalone unusable - one need to provide at least 1 "translation") - actually, Rails uses YAML format, but following example present the idea: // english translation file