SayNumber() function for asterisk for different languages - numbers

I am using asterisk 11.0 and want to use SayNumber() function to speak the number in hindi(Indian language) .I have searched a bit and found code for it. I have pasted the code in say.conf.
My problem is that i have only en(sound file in english) folder on my sounds folder and i need to install the hindi sound folder.Can i install hindi sound file now or i have to make menuselect again?
Is there anything more i need to play number in hindi?

Read this page
http://www.voip-info.org/wiki/view/Asterisk+sound+files+international
and this one
http://www.voip-info.org/wiki/view/Asterisk+sound+files
Also you have set language for channel used(for sip in sip.conf)

Related

How to download libreoffice dictionaries programmatically?

Is there a link where I can find all dictionaries used by libreoffice, organized by language code, so that I can download them with python script?
Is this the right place? https://github.com/LibreOffice/dictionaries
OK My bad. The dictionaries are indeed sitting at: https://github.com/LibreOffice/dictionaries. Then, look for files that end with *.dic. For example, el_GR.dic for Modern Greek, en_US.dic for English US and so on so forth.

internationalization of an iPhone Application

I am new to iPhone App development (I am using XCode 4.2) and I was wondering if there is a way to translate all the strings , caption etc ... internally without having to translate them one by one .
an idea I have in mind is to use NSUserDefaults to save the language as a global variable and translate everything accordingly
another option is to make a look up table (is it even possible in Objective-C ?)
Thanks
You can use NSLocalizedString(#"<#key#>", #"<#comment#>") and one file (named Localizable.strings( per language. If you use the above function you can use the App Linguan (available on the Mac App Store) to generate the Localizable.strings files.
There is also a command line tool called genstrings that will create the file for you, but believe me that Linguan app will pay for itself in minutes.
You should always add a comment to allow a better translation and to provide context about the key.
You can read a step-by-step tutorial of the process here:
iPhone Localization Tutorial
Here's a high-level overview of the basics (the above tutorial has details):
1) Change all your coded strings to call: NSLocalizedString(#"My text", #"Context for the translator")
2) Export all your strings using the genstrings Terminal command.
3) This creates a text file called Localizable.strings with all your English (source) strings. It looks like this:
/* Context for the translator */
"My text" = "My text";
You send that file to the translators. They'll translate the right side like this: "My text" = "Mi texto";
4) You place each translated Localizable.strings file in its proper language folder: en.lproj, fr.lproj, es.lproj, etc.
When your app loads on the iPhone it will check the user's language settings. If the user has chosen French as the system language, the Localizable.strings inside your fr.lproj folder file will load. If there are any untranslated strings, it just defaults to English (or whatever your source language is) for those.
It's worth following the whole tutorial and note that the file/folder names have to be exact!
Look up the documentation for NSLocalizedString. And how to localize your .xib files (you make localized copies in English.lproj, de.lproj, fr.lproj, etc.).
All you will have to create are the files with the key-value pairs for each language you want to translate and name them accordingly i.e. _en, _fr and so on.
Then all you have to do is send a message to this method:
NSLocalizedString(#"myKey", nil)
And this will return the localized String, in whatever language the current iPhone configuration is.

how to unicode commentting a mp3 using LAME encoder

I want to add some comments to my mp3s but my comments all are in non-latin characters like arabic.
I have written a shell program to get the comments from user in windows but since LAME.exe is a console program I don't know how to convert these non-latin character to something meaningful for LAME.
so is there any way to add these kind of comments using LAME.exe?
regards.
I think you're going to have real trouble doing it on the Windows command line, as everything will be working in the system default code page (ANSI) and not Unicode. You won't be able to use Arabic at all unless you're on an Arabic Windows install (ANSI=code page 1256; settable in the region options), and even then I'm not sure it'll actually use the right encoding.
In any case lame.exe is not a good choice for editing tags, as it's an audio encoder, which will decode and re-encode the MP3, causing quality loss.
There are many graphical apps that will batch re-tag MP3s. If you want a scriptable solution you're probably better off with a higher-level language/library that supports Unicode better than the Windows command line/bat files (eg Python + Mutagen, but there are many possibilities depending on what languages you're familiar with).

Streaming and playing an MP3 stream. .mp3 URL format

I used the sample code from http://cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html. it runs OK with default URL. But when I replace with my URL "http://dl.mp3.kapsule.info/fsfsdfdsfdserwrwq3/fc90613208cc3f16ae6d6ba05d21880c/4b5244f0/b/7e/b7e80afa18d06fdd3dd9f9fa44b51fc0.mp3?filename=Every-Day-I-Love-You.mp3", this app shows an message as "Audio not Found". But when I put my URL on Address Bar of Web Browser, I can download this .mp3 file.
really, I can't understand why it is?
pleased tell me!
Thank you very much
My guess would be that the app is designed to play a MP3 encoded audio stream with no limit in length (which is different from your ordinary music file). To set this up, you need a streaming server on the client side.
I think you can find out for sure by trying with a different radio station that transmits in MP3. If that works, it's most likely that your app doesn't like your file.
You should, as Vivek recommends, also try using a simpler download URL for your file, in case the App gets confused by the URL's length and/or structure.
As mentioned, this is due to the URL of the file. The AudioStreamer code specifically checks for the extension of the file and tries to figure out the audio type based on that. If you change that logic to handle your custom URLs, it will start working
So to point you in the right direction: open AudioStreamer.m and look for the references of
hintForFileExtension:
This function returns the type of file based on the extension. If you know the file type won't change (always mp3), the quick and dirty solution is to always assign mp3 type without any logic... like this:
err = AudioFileStreamOpen(self, MyPropertyListenerProc, MyPacketsProc, kAudioFileMP3Type, &audioFileStream);
Note: I've put kAudioFileMP3Type constant instead of calculated value
PS yes, it does work with static mp3 files, even though it's designed for streams and hence misses some of the functionality one would expect from a player that plays a static file on the server (caching, prefetching, proper seeking)
Thats because the default url directly points to a file in the webserver, whereas the the url you've mentioned is a HTTP (POST/GET) operation, which the application may not be designed to handle.
I suspect that your URL is one-time-use. When I try to visit it, I see 408 - Request Timeout.
Many links on mass file sharing websites are like this. If you could download the file directly, you wouldn't sit through a page of ads and premium account offers.
Try again with a file on a normal website, like this one.

how to creating localizable.strings file by code in iPhone

I am working on one multilanguage project which will download string from server depend on language selected by user. I would like to save this downloaded string into localizable.string file. So how could I do that? I know how genstrings works but I would like to generated *.strings file by code and save it. My code will read this *.strings file for localizable. Anybody know which api i have to use?
thanks in advance
Manu
Typically, localization depends on strings files that are within the app bundle. Since you can not modify the app bundle at run time, you will have to put the strings files you downlaod elsewhere and you will have to modify the usual localization methods to find and use those strings files.
Look at Apple's iPhone samples to see how they do localization and fetching of the strings, and see if you can replace all the local accesses of the localization resources with resources in another directory.