translation

Get the word under the mouse cursor in Windows

风格不统一 提交于 2019-12-19 09:08:03
问题 Greetings everyone, A friend and I are discussing the possibility of a new project: A translation program that will pop up a translation whenever you hover over any word in any control, even static, non-editable ones. I know there are many browser plugins to do this sort of thing on webpages; we're thinking about how we would do it system-wide (on Windows). Of course, the key difficulty is figuring out the word the user is hovering over. I'm aware of MSAA and Automation, but as far as I can

How to use the translator service inside an Entity?

时光毁灭记忆、已成空白 提交于 2019-12-19 07:53:45
问题 Let's say I have a User Entity : $user = new User(007); echo $user->getName(); // display Bond echo $user->getGender(); // display "Male"; echo $user->getDesignation() // display "Monsieur Bond" or "Mister Bond" With this function : public function getDesignation() { if ($this->getGender() == 'Male') return "Monsieur ".$this->getName(); else return "Madame ".$this->getName(); } How can I use the translator service inside this Entity to translate "Monsieur" and "Madame" ? It seems the

ASP.Net / MySQL : Translating content into several languages

只愿长相守 提交于 2019-12-19 03:58:47
问题 I have an ASP.Net website which uses a MySQL database for the back end. The website is an English e-commerce system, and we are looking at the possibility of translating it into about five other languages (French, Spanish etc). We will be getting human translators to perform the translation - we've looked at automated services but these aren't good enough. The static text on the site (e.g. headings, buttons etc) can easily be served up in multiple languages via .Net's built in localization

Gettext or database translation

本秂侑毒 提交于 2019-12-19 03:21:12
问题 Which is better: gettext custom MySQL+cache based functionality Gettext is a sort of builtin feature, so I assume it's tweaked for performance. Using poedit is a pain and impossible to show to any client. A custom functionality allows for simple translation interface. But might be heavy on php/db usage. I suppose, which one would you use when? 回答1: Localization is difficult. It is really difficult. It's not just "pairs of words" => "Wortpaare" , it's a lot more complex than that. What most

Django i18n: Common causes for translations not appearing

孤者浪人 提交于 2019-12-18 12:49:28
问题 I am making a multilingual Django website. I created a messages file, populated and compiled it. I checked the site (the admin in this case,) in my wanted language (Hebrew) and most phrases appear in Hebrew like they should, but some don't. I checked the source and these still appear as _('Whatever') like they should, also they are translated on the messages file, and yes, I remembered to do compilemessages . What are some common causes for translations not to appear like that? 回答1: Maybe the

ASP.NET component to edit .resx files

风流意气都作罢 提交于 2019-12-18 12:36:59
问题 I'm developing a multilingual web site and the localization is done mostly by using .resx files. But now I need to enable users with some permissions to edit resource files online from the web site. Does anyone know of any existing component to help achieve this? 回答1: Best thing you can do is move to a DB driven approach. Rick Strahl has this excellent article: Creating a Data Driven ASP.NET Localization Resource Provider and Editor with free source code ! It even has a Import feature so you

opengl rotation problem

烂漫一生 提交于 2019-12-18 09:31:28
问题 can anyone tell me how to make my model rotate at its own center go gravity in stead of the default (0,0,0) axis? and my rotation seems to be only going left and right not 360 degree.. 回答1: If you want to rotate an object around its center, you first have to translate it to the origin, then rotate and translate it back. Since transformation matrices affect your vectors from right to left, you have to code these steps in opposite order. Here is some pseudocode since I don't know OpenGL

Django 1.5.5 displays original (en) strings always (does not translate)

那年仲夏 提交于 2019-12-18 09:29:26
问题 I'm trying to implement simple Django 1.5.5 string translation in templates. I have: USE_I18N = True in settings.py 'django.middleware.locale.LocaleMiddleware' in MIDDLEWARE_CLASSES in settings.py 'django.core.context_processors.i18n' in TEMPLATE_CONTEXT_PROCESSORS in settings.py Some {% trans "My string" %} strings in templates {% load i18n %} in all templates Ran python manage.py makemessages -l he Translated my strings using Poedit Ran python manage.py compilemessages LOCALE_PATHS = ('conf

How to add regular string placeholders to a translated plurals .stringdict in swift ios

▼魔方 西西 提交于 2019-12-18 09:03:33
问题 I want to translate this string using a plurar stringdict in swift for iOS stays at %1$@ stay at %1$@ Using a simple plural without placeholders works, thanks to this question But when I add a string placeholder I get a crash when accessing it. The regular plurals are working using the following xml: <dict> <key>NSStringLocalizedFormatKey</key> <string>%#@format@</string> <key>format</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key

Php multilanguage date: howto?

 ̄綄美尐妖づ 提交于 2019-12-18 09:03:27
问题 Nota: this is not a duplicate of Translating PHP date() for Multilingual Site . I've read it! I'm sorry, I first have to explain how my framework works, so you can understand precisely where my problem is: Here's how my Php code works (rough principles). Let's use for an example someone who wants to see the URL http://myweb.com/valid.php : in the file valid.php the code include the right classes definition then create one object and call the function display() which displays the page. in the