Export to SFM with IPA tags

I have successfully created a dictionary which has the IPA as a writing system for the language.

When I ‘Export to XHTML’ the page looks right.

However when I ‘Export To SFM’ the lines do not seem right.

Here is a modified extract from the XHTML file :-

<span
  class="headword"
  lang="xyz">agle</span>
<span
  class="headword-secondary"
  lang="xyz-fonipa">aglX</span>

Here is a modified extract from the SFM file :-

\lx_xyz Airish
\lx AiriX
\ps Adjective
\de Irish
\dt 3/Nov/2017

Here are the lines with line numbers superimposed :-

\lx_xyz Airish Line 1
\lx AiriX Line 2
\ps Adjective Line 3
\de Irish Line 4
\dt 3/Nov/2017 Line 5

Should Line 2 be the following?

\lx_fonipa AiriX

Is there a definition of the SFM file that I can refer to?

The following is what gets exported from FLEx. It seems to be in the correct format :-

\lx Airish
\lx_xyz Airish
\lx_ipa AiriX
\sn 1
\ps_Eng Adjective
\d_Eng Irish
\dt 03/Nov/2017

Hi Peter,
I’m sorry this is so awkward. I think we didn’t imagine WeSay users being trained in IPA. To get it to export, you’ll have to tell WeSay to pretend that IPA is one of its 4 categories. Do that here:

Hello John,
Thank you for that advice. I will give it a try.