translation

Wrong Java resource bundle loaded

烈酒焚心 提交于 2020-01-03 10:18:10
问题 In my application, I'm using java resource bundle for the translation of its labels. I currently have two files: resources.properties with labels in English (default language) resources_fr.properties with labels in French Then, I load the bundle properties with the following command: ResourceBundle.getBundle(RESOURCE_BUNDLE_NAME, locale); ... where locale is the user's locale. When I'm working with a French web browser, that's ok, I'm getting all my messages in French, as my locale is

How to get the available translations from a dll

夙愿已清 提交于 2020-01-03 02:48:11
问题 Is there a way to get the available resource translations of a .net dll? Our software is being translated in some different languages, and I would like to give the user the choise of what language the software is in, although I would only like to let them choose only between the languages it has been translated in. 回答1: I just got similar problem so just for future reference. For my software translations are in the program folder, each under their own subfolder named after culture name. Code

Qt Linguist - set translator for application Qt *.ui files

佐手、 提交于 2020-01-03 02:40:11
问题 I wrote a tiny, simple example to change applications language after choosing a language in menu. Although connect DOES work (qDebug() prints good messages) it doesnt change a text on my QLabel. I created GUI using QtDesigner. NOTE: All of those files are in the same directory. Im using Qt5. Heres my code: * .pro: QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = qt_pl_en TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp HEADERS += mainwindow.h FORMS += mainwindow.ui

ZF2 Translation

寵の児 提交于 2020-01-01 15:36:47
问题 I have two modules - Application and StickyNotes. I need to use translation on all pages. What I do: 1) In view: <?=$this->translate('Home');?> 2) In Application\Module.php: public function onBootstrap(MvcEvent $e) { $translator = $e->getApplication()->getServiceManager()->get('translator'); $eventManager = $e->getApplication()->getEventManager(); $moduleRouteListener = new ModuleRouteListener(); $moduleRouteListener->attach($eventManager); $app = $e->getParam('application'); $app-

ZF2 Translation

ⅰ亾dé卋堺 提交于 2020-01-01 15:36:12
问题 I have two modules - Application and StickyNotes. I need to use translation on all pages. What I do: 1) In view: <?=$this->translate('Home');?> 2) In Application\Module.php: public function onBootstrap(MvcEvent $e) { $translator = $e->getApplication()->getServiceManager()->get('translator'); $eventManager = $e->getApplication()->getEventManager(); $moduleRouteListener = new ModuleRouteListener(); $moduleRouteListener->attach($eventManager); $app = $e->getParam('application'); $app-

ASSIGN win XP commandline output to variable

倖福魔咒の 提交于 2020-01-01 11:49:30
问题 i would like to translate a following script from linux shell to Windows XP shell GPSID=$(awk '/GPSID/ {print $3}' gora.RTK ) awk -v variable=${GPSID} 'BEGIN {printf "Numer seryjny : " variable,$1}' >>out.txt The second line has been translated; the problem is with defining a variable that contains shell output in windows :-( 回答1: ok problem fixed for /f "tokens=*" %%a in ('awk "/GPSID/ {print $3}" gora.RTK ') do set var=%%a awk "BEGIN {printf \"GPSID : \" }" >out.txt echo %var% >>out.txt

Collecting messages from 3rd party apps in Django

五迷三道 提交于 2020-01-01 10:58:32
问题 How can I generate messages (manage.py makemessages) from 3rd party library which is located in virtualenv directory? I tried simply add the messages to the .po file, but everytime I run makemessages command my translation vanishes. Many thanks 回答1: manage.py makemessages looks only for directories under the current dir. So you have to create symlink from 3rd party app to your project's directory: ln -s ~/.virtualenvs/myvenv/local/lib/python2.7/site-packages/app app mkdir locale python manage

Collecting messages from 3rd party apps in Django

杀马特。学长 韩版系。学妹 提交于 2020-01-01 10:58:28
问题 How can I generate messages (manage.py makemessages) from 3rd party library which is located in virtualenv directory? I tried simply add the messages to the .po file, but everytime I run makemessages command my translation vanishes. Many thanks 回答1: manage.py makemessages looks only for directories under the current dir. So you have to create symlink from 3rd party app to your project's directory: ln -s ~/.virtualenvs/myvenv/local/lib/python2.7/site-packages/app app mkdir locale python manage

Strings won't be translated in Django using format function available in Python 2.7

一曲冷凌霜 提交于 2020-01-01 07:37:49
问题 Does the new and recommended way to format strings available in Python 2.7 using format result in a non translated string in Django? The strings are in the .po file, translated, but it won't be translated on the website. For example: from django.utils.translation import ugettext as _ website_name = "Stackoverflow" title = _(u"{sitename} is a good website".format(sitename=website_name)) The .po file after translating the string looks like this: #: path/to/file.py:4 msgid "{sitename} is a good

Merge translation files (.ts) with existing .ts files using QT Utilities (lconvert)

家住魔仙堡 提交于 2020-01-01 07:33:14
问题 Here's my problem: We've got .ts files for nine different languages for our product. We've added about 100 new strings that need to be translated, but some are for our next release, and some are for the release after that. We've run into problems with translators missing strings or translating strings ahead of time. We want to be able to send them smaller .ts file containing only the strings we want translated now, and then merge that .ts file into the larger .ts file containing the rest of