translation

Python Google Translate API error : How to translate a large amount of data

只谈情不闲聊 提交于 2020-04-13 05:48:47
问题 My problem I would like to use a kind of data-augmentation method for NLP consisting of back-translating dataset. Basically, I have a large dataset (SNLI), consisting of 1 100 000 english sentences. What I need to do is : translate these sentences in a language, and translate it back to English. I may have to do this for several language. So I have a lot of translations to do. I need a free solution. What I did so far I tried several python module for translation, but due to recent changes in

Is it possible to combine two .po translation files together?

风流意气都作罢 提交于 2020-03-17 05:38:54
问题 We have two .po files, each from different branches of a piece of software. We need to combine these into a single .po file. There are duplicates between the two files, and the ideal handling would be for one file's strings to be favoured (consistently). We have a SUSE system so the --output-file doesn't seem to have the behaviour of ignoring/merging duplicates which the Sun version has according to a man page I found from a web search. (We do not have a Sun machine handy!) 回答1: What you are

Is it possible to combine two .po translation files together?

爱⌒轻易说出口 提交于 2020-03-17 05:38:26
问题 We have two .po files, each from different branches of a piece of software. We need to combine these into a single .po file. There are duplicates between the two files, and the ideal handling would be for one file's strings to be favoured (consistently). We have a SUSE system so the --output-file doesn't seem to have the behaviour of ignoring/merging duplicates which the Sun version has according to a man page I found from a web search. (We do not have a Sun machine handy!) 回答1: What you are

Django - redirecting a user to a specific view after GET to a separate view, changing language settings

这一生的挚爱 提交于 2020-03-05 05:04:16
问题 I have a site with that offers 2 language choices - English & Japanese. To change between the languages, A user clicks a button taking them to a view which changes the setting. Previously, it had always redirected to the home page but now I want to take them to where they were before. The current path is passed as a url param which is then saved to a response variable, which then has it's language cookie set before being returned. For some reason, when I use the parameter in the redirect

Django - redirecting a user to a specific view after GET to a separate view, changing language settings

人走茶凉 提交于 2020-03-05 05:03:54
问题 I have a site with that offers 2 language choices - English & Japanese. To change between the languages, A user clicks a button taking them to a view which changes the setting. Previously, it had always redirected to the home page but now I want to take them to where they were before. The current path is passed as a url param which is then saved to a response variable, which then has it's language cookie set before being returned. For some reason, when I use the parameter in the redirect

GetUserPreferredUILanguages() never returns more than two languages

﹥>﹥吖頭↗ 提交于 2020-02-21 11:12:29
问题 I'm trying to retrieve the complete list of the user's preferred languages from a C++/Qt application, as configured in the "Region & language" page in the user's preferences: For that, I am trying with the WinAPI function GetUserPreferredUILanguages(), on an up-to-date Windows 10 Pro system. However, the function always only returns the first entry (the main Windows display language), and "en-US". If English is configured as the main language, then only "en-US" is returned. E.g., if I have

GetUserPreferredUILanguages() never returns more than two languages

孤街醉人 提交于 2020-02-21 11:10:09
问题 I'm trying to retrieve the complete list of the user's preferred languages from a C++/Qt application, as configured in the "Region & language" page in the user's preferences: For that, I am trying with the WinAPI function GetUserPreferredUILanguages(), on an up-to-date Windows 10 Pro system. However, the function always only returns the first entry (the main Windows display language), and "en-US". If English is configured as the main language, then only "en-US" is returned. E.g., if I have

GetUserPreferredUILanguages() never returns more than two languages

岁酱吖の 提交于 2020-02-21 11:10:08
问题 I'm trying to retrieve the complete list of the user's preferred languages from a C++/Qt application, as configured in the "Region & language" page in the user's preferences: For that, I am trying with the WinAPI function GetUserPreferredUILanguages(), on an up-to-date Windows 10 Pro system. However, the function always only returns the first entry (the main Windows display language), and "en-US". If English is configured as the main language, then only "en-US" is returned. E.g., if I have

Easy way to translate a website

无人久伴 提交于 2020-02-21 06:05:41
问题 Question I have a fairly static website with just a few basic PHP usage. Now the customer would like to have this website translated. I do have a solution, but it's cumbersome and I was wondering how others are doing it and what is the standard (in frameworks, etc.). My Way My way (I have simplified it a bit for the sake of easier understanding): I generate a PHP array for each language from the database and store this array in a language file, like es.php for Spanish. I then translate a

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