Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic translation function doesnt work for me. Is there anything else to setup to make it work? #54

Open
johny2110 opened this issue Mar 1, 2024 · 0 comments

Comments

@johny2110
Copy link

Hi guys,

I guess I overlook something really basic as I am just beginner at programming.
The thing is that I am trying to integrate liblouis to my Javascript project:

I created node-js project testing-liblouis.
I start with npm i liblouis.

This install liblouis and it's dependency liblouis-build with translation tables.

When I try basic example that is in ReadMe:

const liblouis = require("liblouis");
console.log("Liblouis Version using Easy API:", liblouis.version());
liblouis.setLogLevel(liblouis.LOG.ALL);
var unicode_braille = liblouis.translateString(
"tables/unicode.dis,tables/de-de-g0.utb",
"10 Ziegen"
);
console.log("Unicode Braille:", unicode_braille);
console.log(unicode_braille);

It returns:

Liblouis Version using Easy API: 3.2.0
[ALL] Performing translation: tableList=tables/unicode.dis,tables/de-de-g0.utb, inlen=20
[ALL] Inbuf=0x0031 0x0030 0x0020 0x005A 0x0069 0x0065 0x0067 0x0065 0x006E 0x0000 0x001B 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 ~ 10 Ziegen
[ERROR] Cannot resolve table 'tables/unicode.dis'
[ERROR] 1 errors found.
[ERROR] tables/unicode.dis,tables/de-de-g0.utb could not be found
Unicode Braille: null
null

I tried to set also path to tables:
const tableFolderPath =
"C:/Users/MyUser/testing-liblouis/node_modules/liblouis-build/";
liblouis.enableOnDemandTableLoading(tableFolderPath);

The output remains the same.

Is there something that needs to be adjusted or configured to make it work?

Thanks a lot.

Jan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant