Send e-mails in user's preferred language in Drupal 7 - drupal-7

I have locale module enabled. But I don't see any options to have e-mails (Account activation, Welcome, Password Recovery) translated.
How do I send e-mails in the user's preferred language?

Just in case someone needs it. Need to download the Internalization module http://drupal.org/project/i18n and enable the Variables translation submodule. Then you need to follow instructions here http://drupal.org/node/1113374 . To input the translation (or another version for another language) you need to switch your language to the one you want the translation for. And put the other language version into the field where the English version was.

If the language you want to use is enabled on the site, you should be able to translate the message text in the Translate interface. Go to Configuration -> Translate interface. Under the Translate tab, type in the first few words of the message. Find the text you want and add a translation.

Related

Intercept voice commands on Google Assistant or Alexa

I'm planning on doing an experiment, where we will setup a Google Assistant or Alexa device and see how people would interact with voice assistants in a certain environment. It's basically a Wizard of Oz experiment (https://en.wikipedia.org/wiki/Wizard_of_Oz_experiment). Is it possible to intercept the voice commands before they get passed to the Assistant or Alexa? This could help me decide/manage if I want to handle the user input or let Google/Alexa handle it.
Will you be using a purchased "original" device or will you use, e.g. an Raspberry PI and build it yourself?
For the former this won't be possible out of the bow. However, I recently stumbled upon an article. It describes a new device which would achieve something that might help you: It allows you to "reprogram" the activation word for Alexa and Google Assistant. The article mentions that the device's hardware is a Raspberry PI. So, I guess you could build something similar yourself. That was also the first idea that came into my mind.
I would imagine something like this:
On your raspberry you have a script (I guess written in python would be easiest) that listens for the wake-word, e.g. "Alexa" and also records the following voice. However, you have Alexa itself not running for now, so it doesn't get triggered. Your script also includes a logic for when to pass the command on to Alexa or what to do with it instead. When it decides that the command is to be passed on, the script starts Alexa and replays the recording. Thus, triggering it the same way the users would have triggered it, in the first place.
Another idea would be to use two microphones. One for your script and one for Alexa. Your script having the ability to mute/unmute those.
Pleas take into account that those are just spontaneous ideas. It's completely possible that I've missed something and this wouldn't work. But until somebody who has done this before comes up, I'd give it a try!

Alexa Skill Language

Is there any possibility to switch the language for skills? It seems to me that alexa directly uses german as well as english but using alexa over a skill, english is the preferred language. So slots are not beeing recognized properly
When you create a skill you can choose a "default language" next to your "Skill name".
When your skill is already created you can set the Availability of your skill.
Maybe your device itself is not configured to the correct language?
Did you try the "Alexa Simulator" in the developer console? There you can change the language as well to test your skill.
You should have a look in the JSON Input what is written for "locale".
Here are some more details: https://developer.amazon.com/docs/custom-skills/develop-skills-in-multiple-languages.html
Yes, you can add language from your build screen > language settings and also sample utterance for a particular language and you can test different language by test > change language.

Signable, streamable, "readable" archive format?

Is there any archive format that offers the following:
be digitally sign-able with a digital certificate from a trusted source like Verisign - for preventing changes to the file (I am not referring to read only, but in case the file was changed it should no longer be signed telling the user this is not the original file)
be stream-able - be able to be opened even if not all of the content has been transferred (also not strictly linearly)
be "readable" - be able to read the data without extracting to a temporary folder (AFAIK if you open a file in a zip archive it is extracted first, and this stays true even for zip based formats like OOXML. This is not what I want)
be portable - support on at least Windows, Linux and Mac OS X is a must, or at least future support
be free of patents - Be open source - also preferably a license that allows commercial use(as far as i know GPL a share-alike license so it doesn't allow commercial use, BSD on the other hand allows it)
Note: Though it may come in handy eventually I can not think right now of a scenario that would require both point 1 and point 2 simultaneously. Or lets leave it a be able to check the signature only when the whole file was downloaded.
I am not interested in:
being able to be compressed
being supported on legacy systems
Does any existing archive format fit this description (tar evolutions like DAR and pax come to mind) ?
If there is, are there programing libraries available for the above mentioned OSs?
If not, would it be hard to create such a thing?
Usage scenario:
I want to use this to create a new media container.
Current media containers contain the audio, video and subtitle streams directly.
Matroska, currently the most advanced container, has supplementary features like attachments and menus.
The menu functionality however is not implemented and very limited.
What I want to create is one level higher.
I want to create a file similar in a way to OOXML.
Also all of the menuing should be done in web technologies like HTML5 (as it is now the tag allows for any kind of codec to be used) and CSS.
Also just like you have holograms on dvds to prove the authenticity I want to create a sign-able file
Research notes:
Before asking this question I stumbled uppon this:
Whats the best way digitally sign a zip file for download using .Net
While detached signing would be feasable for the individual files contained in this archive it is not an ellegant solution for the archive file. Not end user friendly.End users should be able to doubleclick the file to open it in a media player like VLC, and see a message that the file is legit (just like you see in a browser if the page is transmitted with SSL through HTTPS or not)
EDIT: clarified point 5
EDIT 2: added a note to clarify point 1 and 2
EDIT 3: added usage scenario
EDIT 4: added research notes section
P.S.: This is my first question on StackOverflow
I doubt that you find such format out of the box. I understand how such solution can be built with help of our SolFS, but SolFS doesn't have built-in signing (you can add signing easily).

C code autocomplete in Eclipse

I'm a Java developer and I've downloaded the Eclipse for C (course purposes) and to my amazement the control+space shortcut (for autocomplete) did not work.
I've created a new project and a new class using the wizzards and started to type "print" and then tried to find an autocomplete feature.
After a bit of googling I arrived at C/C++->Editor->Content Assist->Advanced and there I verified that Help proposals,Parsing-based proposals and Template proposals options were checked.
I then went over to the Keys preferences page using the link at that page and entered a binding for all relevant content assist from before C\C++ Content Assist (type...) and chose in the When box the C\C++ Editor option.
But alas no autocompletion was offered.
Can someone please point me to the right direction?
UPDATE: I'm accepting the answer not because I'm sure it's right but because I've realised I've made some mistakes with the configuration of the eclipse and have seen that with another installation/configuration (i.e. a friend of mines) eclipse does auto complete, even if it still lack many of the java version features.
Use the Advanced panel in the Preferences window to configure the behavior of the Content Assist (Ctrl+Space) command. Go to Preferences->C/C++->Editor->Content Assist->Advanced. Check the parsing-based-Proposals in Default Proposal kinds.
Although the eclipse doesn't provide perfect auto-complete, but it works..
This sometimes happens when you have the indexer turned off.
Try to enable the indexer and rebuild the index.
See this question in CDT FAQ. It contains info about how to find indexer error which might prevent auto-complete.
I'm no Eclipse expert (and I don't even play one on TV), but it might be that it only autocompletes function names that are declared in the current scope - have you added #include <stdio.h> to the top of your source file to get the declarations for the standard I/O functions?
You should verify that you have the gcc home (i.e. C:\MinGW-4.4.1\bin) defined in the path environment variable (if you're using windows and if not then it's equivelant). Also verify that the file has a .c suffix and that the indexer is on as yousf said.
I think, not sure, that you need to then run eclipse with the -clean flag and the autocomplete will work.
Ittai
i answered it here:
Eclipse: How to add include path to be used by autocompletion
You have to explicitly tell it where to find the header:
⇒ Right click on your project ⇒ go to 'C/C++ Include Paths and
Symbols' ⇒ select 'Add External Include Path...' ⇒ browse
to the location of your header files ⇒ refresh
Maybe it is related with KeyAssist bindings.
If you have tried with content assist:
Enter into Window > Preferences. Menu "General" -> "Keys"
Inside search for "Template" and set:
Key Binding to -> "Ctrl + Space"
When: "Editing Test"
Image helper Image Menu Key Assist Code Complete
Vim offers this functionality by scanning your #include's (the shortcut is Ctrl-N, or Ctrl-P to search backwards). If you can't find any better solution, one last resort could be looking into eclim, which integrates vim features into Eclipse (or vice-versa), and that's sure to offer this feature.

Customizing Print to File in WIndows

I have a requirement where my client want to install a custom "Print to File" printer (apparently MS has an SDK for this?). They want to be able to install this as a kind of "application" so that if someone chooses to print to this printer, they have to answer a few questions, and the file gets "printed" to a path of our choosing. (we will then do some other things with the file such as rename it and SFTP it)
I have tried googling, looking for things such as "customize print to file" and I have found nothing. Does anyone have any experience with this and can give me a kick in the right direction?
EDIT: I would rather have a c# oriented solution but I am willing to take anything right now.
Edit 2: The idea is for this "custom print driver" is for a document imaging company to provide an easy method for their customers to store/archive documents. The idea, is that the customer, if they want to store/archive a document, they would print, from standard windows applications such as Word, Excell, Acrobat Reader, Web Pages, etc., to the "company X" printer driver. When doing so, the document would get "printed" to a file in a specific location that another application (which has a filewatcher service on it, which would rename it and send it to the SFTP server), knows to watch. The document that is printed to the file, should ideally also be able to come out on paper (AKA just like normal). When printing to the "Custom print driver", we also need to have a form filled in which would provide meta-tags for the archiving system, which would also be uploaded to the document imaging system.
I am not looking to recreate a printing application, nor am I looking to add "printing" into a custom application. This needs to work at the Windows level.
I have no problems with the SFTP, FileWatcher, Alchemy integration (the document archiving application) or the document renaming portion. It's the "custom print driver" that I am having issues with. This is all compounded by the fact that when installing the application, I need to automatically install the "custom print driver", and configure it during the install process. Essentially the solution needs to be installed as a printer available under "My Printers" and should be available for any type of document, Word, Excell, PDF, etc. Oh, and it needs to be availabe for XP, Vista, and Windows 7 . . . . :(
Thanks in advance for everyones help. I have a feeling that this one is going to be a doozy :(
Hah! I knew I'd seen at least one...
ActMask Virtual Printer Driver
Can't make a recommendation of any sort not having tried this particular toolkit - but it would appear to me to bear a strong resemblence to the sort of solution you're after.
What kind of customization you are talking about? Can't you use the .Net inbuilt one?

Resources