internationalization

Django - Javascript internationalization: translation not rendered in site

浪子不回头ぞ 提交于 2019-12-13 05:18:27
问题 I have followed the docs. ./manage.py makemessages -d djangojs works fine. ./manage.py compilemessages created the relevant .po files However, the translation is not performed on site. urls.py js_info_dict = { 'packages': ('market',), } urlpatterns = [url(r'^jsi18n/$', javascript_catalog, js_info_dict), ] urlpatterns += i18n_patterns( url(r'^$', HomePage.as_view(), name='home'), ) settings.py LOCALE_PATHS = ( pjoin(BASE_DIR, '00', 'locale'), ) # Middleware ====================================

iReport - How to change report direction to RTL?

空扰寡人 提交于 2019-12-13 05:16:20
问题 How can I change the page direction to RTL in iReport, as am working on a report that should be displayed in english & arabic, I am using local for the text to appear in both languages but I can't find anything to change the direction I know this question was asked before but I didn't find any answer: How to make a report page direction to change to "rtl"? 回答1: As far as I searched there is no property, you can use below util class: package foo.bar.utils.export; import java.util.Iterator;

printf output not affected by global locale?

淺唱寂寞╮ 提交于 2019-12-13 04:49:36
问题 I cannot get the printf functions in Visual-C++ (VS 2005) to output thousands separator in my integers. Note: Comments indicate that this is printf 's normal behaviour. However, C++ iostream does insert the thousands separator into numbers (tested with std::stringstream and imbue ) so is this purely a feature of iostreams and isn't present in the "C" formatting functions? Here's the test code: setlocale(LC_ALL, ""); // -> User locale _locale_t loc = _create_locale(LC_ALL, ""); // -> user

Ruby on Rails I18n - Localization of Dates Works In localhost but Not In Production

情到浓时终转凉″ 提交于 2019-12-13 04:27:50
问题 I am using Ruby on Rails 3.2.13 Ruby 1.9.3. I have the following code in my en.yml file: date: formats: default: "%Y-%m-%d" short: "%b %d" long: "%A, %B %d, %Y" mmyy: "%B %Y" I have the following code in my fr.yml file: date: formats: default: "%Y-%m-%d" short: "%b %d" long: "%A, %d %B %Y" mmyy: "%B %Y" My date field media_created is stored in a string in YYYY-MM-DD format Here is the code in my view to display the short date format in my view: <%= l media_item.media_created.to_date, format:

Python Internationalization (gettext)

倖福魔咒の 提交于 2019-12-13 03:44:43
问题 I'm experimenting with internationalization in Python. I started with a simple "Hello, World" script and I now grasp the basics of using gettext. I read in the documentation that concatenating strings together like so: msg = _('Start of message') msg += _(' end of message') is not recommended as it splits the strings to be translated and can lead to errors (that's what I understood from the documentation anyway). I wondered what the best practice was for dynamically generated strings - for

For Xamarin.Forms localization, do I need to implement ILocalize?

梦想的初衷 提交于 2019-12-13 03:24:26
问题 In Xamarin help page https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?tabs=windows, for "Displaying the Correct Language", it suggests to define interface ILocalize then use DependencyService to get some locale info. However, My Xamarin.Forms Android app could just pick the right language resource file according to the locale settings of the device, and display rightful language. So translations are working fine without ILocalize and the

How can I get started developing a site in Arabic in ASP.NET?

允我心安 提交于 2019-12-13 03:02:21
问题 I would like to develop a website using ASP.NET in an Arabic language. What would be some good places to begin? Useful advice to keep in mind? 回答1: I did some of this in a former life, here's what I recall: Is it going to be just ar-foo? If not (and I would always encourage thinking about the future possibilities), then having a page layout which is either flexible enough to handle RTL and LTR or switchable is going to be a big deal. That includes moving elements like the ubiquitous left-hand

Django url internationalization not working in production mode

陌路散爱 提交于 2019-12-13 01:34:51
问题 i'm programming in django 1.4 a site with multilanguage support (french and english). Everything works fine in debug mode. Then I pass to production mode (DEBUG=False) and the urls no longer work. Ex. : in debug mode, when I request the page /agricole/, django redirect automatically to /fr/agricole. But in production mode, it sends a error and no longer redirect the page. I have searched the web, check the LocaleMiddleware, like said on django documentation and everything, but it still fails.

Java: Write national characters to PDF using PDFBox [duplicate]

南楼画角 提交于 2019-12-13 01:26:57
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Using PDFBox to write UTF-8 encoded strings to a PDF I need to create PDF with Czech national characters, and I'm trying to do it with PDFBox library. I have copied following code from some tutorials: public void doIt(String file, String message) throws IOException, COSVisitorException { PDDocument doc = null; try { doc = new PDDocument(); PDSimpleFont font = PDType1Font.TIMES_ROMAN; TextToPDF textToPdf = new

Datepicker is always displayed in Simplified Chinese?

依然范特西╮ 提交于 2019-12-13 01:10:03
问题 i'm trying to get the JQueryUI datepicker to display French/English localisations, but only Simplified Chinese is being displayed. What am I doing wrong? Thanks <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/i18n