Closed ribalnasr closed 3 years ago
Hi @ribalnasr 👋
I will have a look at this asap.
@ribalnasr you can update to flamelink@1.0.0-alpha.33
Please let me know if the issue is not resolved.
// create an entry for a different locale
// this will create a placeholder entry in your default locale
const nl_entry = await fl.content.add({
schemaKey: "sdkTest",
data: { text: 'entry text' },
locale: "nl"
});
// create an entry for your default locale
const entry = await fl.content.add({
schemaKey: "sdkTest",
data: { text: 'entry text' },
});
// add an entry in a different locale for the original entry
// you can use content.update here too - it will then just create the entry if it does not exist
const entry2 = await fl.content.add({
schemaKey: "sdkTest",
entryId: entry._fl_meta_.fl_id,
data: { text: 'entry text' },
locale: "nl",
});
// update an entry for a different locale without switching
const entry3 = await fl.content.update({
schemaKey: "sdkTest",
entryId: 'someEntryIdHere',
data: { text: 'entry text' },
locale: "nl",
});
hello,
here's my case: sometimes you want the global locale for the sdk to be 'en-US' but you may need to add (or update) a document in a different locale without having to switch between locals before and after.
the add() method does take a local property but it doesn't do the trick, the new document is still created under the global locale.