Dynamic localization files blackberry - blackberry

Here's the scenario I have. I'm working on a multi-lang application but the available languages are dynamic and returned by an API from the server. After selecting a language I should download the localization file that contains the key/value pairs to use it in my application.
My question is, does the BlackBerry localization system allow such behavior? I mean can the key/value localization files be added to the application dynamically or they have to be bundled in my COD?
If that scenario doesn't work, I would appreciate suggestions on how to do this.

The default resource files used to localize an application must be bundled with the application.
Instead you could use Locale.getDefaultForSystem() to return the current locale in use and based on that load the correct language from your remote source.

Related

Can I programmatically change the text of the Localizable.strings file? [duplicate]

I want to be able to update localized strings by code from the app. What I actually want to do is to make changes to the localization on a server and then let the iPhone application fetch updated localization strings from a server and then save them to the localizable.strings file.
You can't ! Those files are part of the bundle and can't be updated. You will have to setup the whole translation framework by yourself (which is not that much work) and implement caching using either core data or serialized dictionaries (one for each language I suppose).
You won't be able to modify the Localizable.strings file in your app bundle because the app bundle is read-only on iOS devices. To grab localized strings from a strings file in your app's Library directory, you could programmatically create a bundle at that location, put a Localizable.strings file in it and then grab the localized strings with NSLocalizedStringFromTableInBundle(). (I haven't tried this but it should work.)
There's service (Get Localization) that allows you to upload those .strings files to server and fetch them via API. However there's no client for iPhone yet but it would be quite simple to do. You can contribute one or then wait that there's official available.

iOS - fastlane deliver, localized App Store description from strings file?

I'm getting ready to have my app localized into other languages.
I'm using NSLocalizedStringWithDefaultValue to provide default English text within code, although I guess none of that maybe relevant.
I'm not adding localized text directly to nib or storyboards, everything is in my strings file.
I'll probably end up uploading those to a localization site.
So I'd like to use fastlane deliver to upload screenshots and meta data.
However I'd like to find a method where I can pickup values from my strings files.
So I guess my question is, how can I get my strings value into my deliver text file?
Or is there a better / quicker approach I should use?

TYPO3 alternative page language configuration

I'm trying to join a bunch of pages that are in different languages to a single page whith multiple alternative page languages.
This way, instead of having 3 Home pages, each one with its own language, I have 1 with several alternative page languages. So I'll have one page but the content is in different languages, depending on the language record it uses.
The issue is that TYPO3 extensions should behave differently depending on the language, i.e: form fields should be translated.
For that I was thinking on having a local storage folder for each page language record in order to hold the extension configurations. Chinese language would have a separated storage folder from the english version and the extension running for the chinese version would use the correct storage folder.
But how can I specify which storage folder the extension in the chinese language record should use if I don't use a new page?
Because if I use a language record to differentiate chinese from english I can't have different typoscript configurations. The language record properties page doesn't have a ts config field and as such I can't tell that the extension should use a different storage folder (different pid) for this language.
For each language you can add a cObj plugin and thus edit the plugin configuration. You can also use a condition and getText to assign a new pid to the plugin. For example plugin.test_pi1.sysfolder < 666.
The first option is when you look in the mysql table language overlay you have a separate record ctype plugin of your plugin and thus you can edit the plugin configuration.

Custom file types with iOS Document Interaction Programming

I understand the basic of Document Interaction Programming and UIDocumentInteractionController and I've got it working in my app. However I'm having trouble with specific details of using custom file types. I can't find this addressed in the Apple docs anywhere.
My app uses it's own file types with unique extensions. The files themselves are just plists (xml), but I want the device to treat the files as only openable in my app. Originally I implemented the Document Interaction stuff to treat them as XML while I got it working, but now I want it to treat them as binary files that it needs to hand off to my app.
At the moment, if you have one of my files in an email attachment, iOS first shows the QuickLook (which just spews all the text content of the xml out) before you can choose to Open In. Similarly if one of my files is opened with Safari, Safari just shows the XML and doesn't give you the option to show it in my app at all.
So how do I get iOS to not treat my files as XML? I've changed the "Conforms to UTI" value and "public.mime-type" value in the info.plist, but it seems to have no effect.
Any tips greatly appreciated.
As far as i understand the UIT concept of Apple you cannot just change the file extension to change a potential UIT of the file. If the file contains XML-Data, other apps as well as internal apps might recognize your content and show it internally as XML.
Try to store your Plists with NSPropertyListSerialization NSPropertyListBinaryFormat_v1_0 (then you readble XML)
When you did that without success, why not trying this:
use zlib to compress the XML plists afterwards to a zipped file.
make a "unique" file extensions (<file>.myappname)
this should "hide" other apps and quick view.
Tell me if one of the ways did work for you.

How to list my application when you try to open a PDF in email?

I wanted to list my application in the list of other readers installed in the iphone when I try to open the PDF from the email. What settings do I need to do on my project so that my application is also listed in it.
Are you looking for Implementing Support for Custom File Formats?
Applications that are able to
open specific document or file formats
may register those formats with the
system. When the system or another
application needs to open a file, it
can hand that file off to your
application to do so. In order to
support custom file formats, your
application must:
Register the file types your
application supports with the system.
Implement the proper methods to open
files (when asked to do so by the
system).

Resources