translation

Weird issue, translations works if logged in, if not then didn't work in Symfony 2.5.6

我的梦境 提交于 2019-12-24 02:49:05
问题 I come here with this weird issue around Symfony2 translations since I don't know what else to do. As title says "translations works if a user is logged in, otherwise doesn't. Here is what I've done: Set default locale and translator at config.yml : framework: translator: { fallback: "%locale%" } default_locale: "%locale%" Set locale value at parameters.yml locale: es Set language at base template: <html lang="{{ app.request.locale }}"> Check locale after page loads in Twig template where

Why is msgid_plural necessary in gettext translation files?

百般思念 提交于 2019-12-24 02:16:12
问题 I've read the GNU Gettext manual about Translating plural forms and see its example: #, c-format msgid "One file removed" msgid_plural "%d files removed" msgstr[0] "%d slika je uklonjena" msgstr[1] "%d datoteke uklonjenih" msgstr[2] "%d slika uklonjenih" Why is msgid_plural different from msgid, and doesn't that defeat the purpose of having translations be aware of plural forms? I'd think that I could do something like this (for English): #, c-format msgid "X geese" msgstr[0] "%d goose"

TinyMCE-dialogs of Plone site are not translated

有些话、适合烂在心里 提交于 2019-12-24 00:12:09
问题 The main issue is a dialog for links: for external links the target dialog is empty. But the issue itself seems to be that this dialog and also other dialogs of TinyMCE and the control panel for TinyMCE is in english, not the language of the website, which is not english. Any hint where to start debugging? Plone 4.3.11 , TinyMCE 1.3.23 default for Plone 4.3.11 german 回答1: Looks like the translation-files aren't compiled and that you ran into https://github.com/plone/Products.TinyMCE/issues

Decompose expression in base operation: ANTLR + StringTemplate

流过昼夜 提交于 2019-12-23 17:30:32
问题 I am trying to write a translator for a Java like language to multiple languages. Right now I am facing 2 problems: First is to decompose complex expression in a sequence of basic operation and then translating them to destination language. For example my starting language can be: var a = (ln(b) + avg(c))*2 I'd like to traslate it like: var x1 = log_N(b); var x2 = average(c); var x3 = sum(x1, x2); var a = multiply(x3, 2); I think i have to use a Tree parser, nut I am not sure how to integrate

.PO to .MO - Programmatic Conversion (PHP)

折月煮酒 提交于 2019-12-23 16:48:34
问题 I am planning to allow users to generate .POT files/.PO files through a PHP user interface as part of CMS solution. Once these files have been generated (the easy bit) I would like to allow my system to automatically convert these files into .MO files in response to a user (POST) request. I have seen the following question on SO: .po to .mo convertor in php? I understand that I could run msgfmt by using PHP's exec() function, but that seems to be a Linux only solution, if I am correct? How

Rotating OpenGL scene in 2 axes

岁酱吖の 提交于 2019-12-23 12:08:42
问题 I have a scene which contains objects located anywhere in space and I'm making a trackball-like interface. I'd like to make it so that I can move 2 separate sliders to rotate it in x and y axes respectively: glRotatef(drawRotateY,0.0,1.0f,0); glRotatef(drawRotateX,1.0f,0.0,0.0); //draw stuff in space However, the above code won't work because X rotation will then be dependent on the Y rotation. How can I achieve this without using gluLookAt()? Edit: I'd like to say that my implementation is

Using GitHub with another Bug-tracker? [closed]

断了今生、忘了曾经 提交于 2019-12-23 07:48:29
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago . I am involved in this project, Pinta, and we are currently using GitHub for our development. We all love Git and GitHub and want to keep using it. However, now the project is getting stable and involved, and it's time we started using a more capable bug tracking system than

OSQA translation issue: strings not present in django.po

你离开我真会死。 提交于 2019-12-23 03:32:19
问题 Trying to create a translation for OSQA Fist I copied the FR locale to RU, updated the settings. Fine, Most things are working but now everything in the django.po file has been translated but still a few lines show up in English and I I cannot find them.. For example the string "Most recently updated questions" in the upper sidebar content right underneath the number of questions. The string is just not present in the django.po PS: I installed OSQA on webfaction using the wiki script. Any

Define the language when using gettext __d() on CakePHP

浪子不回头ぞ 提交于 2019-12-23 03:32:11
问题 I want to define with language I want to use on a single call to __d() (the gettext() CakePHP translation function). I want something like: __d('domain', 'Hello World!', 'pt_BR'); Even if my site is shown on en_US , I want that very message to be shown on a specific language. Thanks! 回答1: Something like this could work (untested though): function __dl($domain, $str, $lang, $return = false) { $original = Configure::read('Config.language'); Configure::write('Config.language', $lang); $str = __d

translate my app

本小妞迷上赌 提交于 2019-12-22 17:54:04
问题 What I want to do is provide the user with a spinner which contains several languages, when a language is selected, the app will translate to that language. I have different string files but I have no idea how to implement this. Is this possible? How can I do it? 回答1: In the res folder, respect this : res/ values/ strings.xml values-es / (here for spanish values) strings.xml values-fr / strings.xml (here for french values) Android loads the appropriate resources according to the locale