Attempt to get length of null array error message

The name is “TrekoRando-fr-Translation.json”

Hi @Stefun Welcome to Kodular Community
Are you testing in Companion?
This error is because of FileListFromAssets method.

Are you testing on Companion?

Yes testing from companion
I put my “TrekoRando-fr-Translation.json” into Assets (but not sure how it works actually :sweat_smile:)

Actually, you are right I take the algorythm from this example. And in this example, strings are created with a concatenation of text and an integer. In my case just a string.

Inside my json file :
{ “label1”: “Kodular est magnifique !”, “label2”: “En plus c’est pas très compliqué :)” }

And the whole algorythm is here (I did a mistake while posting the first screenshot) :

Well, this method can not work in Companion
But you can make this method work in Companion here: How to effectively translate your application

Actually, this is from what I made my blocks :confused:
I just changed the way the Translate parameter is built (just a string in my case whereas a string concatenated to an integer, in the example you gave me).

Can you send the translation file?

Yes sure, here it is :
TrekoRando-fr-Translation.zip (238 Bytes)

I have made it manually :innocent:

Some methods of TaifunFile does not work in Companion.

I found the problem, you need to delete it (what is marked in yellow)


-Leave only: TrekoRando

1 Like

This is what I said @Point :slight_smile:

For some reason I did not notice it :thinking:

1 Like

Oops, i’m sorry, actually I changed this part to make some more simple tests (not constructing the filename), and forgot to changed it before posting the image.
The good image is here :

But unfortunatelly, it still leads to the same error message :pensive:

I noticed you sent here a ZIP file containing the json file Did you add the ZIP file to the assets?

no of course, it is directly the .json file in the assets (zip was created to be allowed to upload it :wink:)

I don’t think you are interested in reading my posts.
Read it at least once and if it works then let me know.

Sorry, of course i’m interested in every answer that could help me to resolve my issue.
But i’m freshly new and really don’t know what to do… Maybe you can tell me what can I do instead of telling me it’s not working :wink:
I’m still wondering how all of this works !!

Do you mean that the only way to make it working is to generate the apk and install it on my device to test ? :face_with_raised_eyebrow:

Short Answer: Yes
Alternate Answer: Use this file manager extension-


Why
TaifunFile extension was originally made for App Inventor and its distros who use the same path for asset storage but a few months ago Kodular started using a different path and thus the extension does not work completely in Kodular Companion.
But FileTools is made for Kodular and supports App Inventor also.

2 Likes

Thanks a lot for your advice !
I tried your extension, only by replacing the .FileListFromAssets block as shown here

Now I have no error message but on my app, in label1 and label2, i have this message :

:exploding_head: