Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sequoyah-dev] Resource editor

Hi Jean,

I'm moving this issue to the mailing list, so we might help other developers too, ok? :)
We appreciate your suggestion of improvements. In fact, right now we are working on some already identified points to get a better user experience with Localization File Editor. We'll also analyze yours and work on them when possible.

Regarding your questions, as an Android developer, there are some guidelines you can follow:

http://developer.android.com/guide/topics/resources/localization.html

http://developer.android.com/resources/tutorials/localization/index.html

http://developer.android.com/guide/topics/resources/available-resources.html

http://developer.android.com/guide/topics/resources/providing-resources.html


Hope these can give you some help. 
If not, please feel free to come back to us anytime! :)

On Tue, Oct 5, 2010 at 10:23, Jean-Yves Avenard <jyavenard@xxxxxxxxx> wrote:
Hello

I have just finished reading
http://www.eclipse.org/sequoyah/documentation/OtherLocalizableResources.pdf
and saw your name on the document.

I thought I could write to you directly as you may help on my issue.

Currently porting an iPhone application to Android. I've encountered
an issue that I haven't been able to overcome yet.

On the iPhone, translating your text is trivial. Put all your
strings/text in Localizable.strings in the format: "sentence to
translate" = "sentence translated"

The original string can contain any characters of any type. Then you
retrieve the data with [[NSBundle mainBundle]
localizedStringForKey:(key)] where "key" is the text your looking for.
No restriction on what key contain (character-wise)

Trying to reproduce something similar on Android, in the strings.xml I
added all keys like: sentence translated

Then I was hoping to do something like:
int resID = getResources().getIdentifier(tmp, "strings",
"com.name.app_name"); where tmp contains the string. Once I get the
resID, I can get the translated string with findresourcebyId.

Unfortunately, found out that it ain't so easy. The name of the string
can't contain space, can't start with a digit and so on (if a keys
does contain those, the project won't even run).

Eclipse doesn't show me anything, but when trying to run the code, I
simply get a "Your project contains errors. Please fix them before
running your application" and that's it. Can't see anything in the
error log etc..

So, what are the restrictions in the name of a resource on Android. Or
is there a way to circumvent it and easily replace one string with
another. I'd like to keep the original dictionary of text I was using
on the iPhone to keep things simple and not introduce any unnecessary
errors.

The editor doesn't give me any kind of feedback if the name of a
resource is a valid one or not. And so far, unless I just keep hitting
run and search in the raw xml for an incorrect string, I don't see how
to find the culprit.

Thanks!
Jean-Yves



--
Thanks,

Daniel Pastore
Sequoyah Team


Back to the top