Debug
Sometimes there is unexpected behavior, there is a debug prop to try and detect wtf is going on.
You'll get some logs, try it by yourself :)
- React (web)
- React Native
- Node.js
import { I18nKeylessText } from "i18n-keyless-react";
return (
<I18nKeylessText debug>
Hello world
</I18nKeylessText>
);
}
import { getTranslation } from "i18n-keyless-react";
return (
<p>
{getTranslation("Hello world", { debug: true })}
</p>
);
}
import { I18nKeylessText } from "i18n-keyless-react";
return (
<I18nKeylessText debug>
Hello world
</I18nKeylessText>
);
}
import { getTranslation } from "i18n-keyless-react";
return (
<p>
{getTranslation("Hello world", { debug: true })}
</p>
);
}
warning
awaitForTranslation NEED to be awaited, to prevent 429 to happen.
import { awaitForTranslation, type Lang } from 'i18n-keyless-node';
async function sendNotificationsToUsers() {
// ...
const title = await awaitForTranslation(
"Hello world",
user.lang as Lang,
{ debug: true }
);
// ...
}