Hi, I would like to create and store as a single field a multilingual string.
Example: אבגד Abcd - The left 4 characters are Hebrew an rtl language.
Is there any problem storing the above example as a single field - for instance how would it sort?
Thanks for your help
David
Dear David,
The custom single line field can store the multilingual text.
For the question: for instance how would it sort?
For example there are two posts with single line field values:
- אבגד Abcd
- אגבד Abcd
It will be sorted by left Hebrew first.
Thanks Luo for the reply
This field will contain the name in Hebrew and its English phonetic pronunciation. There can be several names, I want to list each Hebrew name and its English phonetic on a separate line, can I use a custom single line field or do I need another field type?
Thanks
David
In your case, I suggest you try with two single line fields, for example:
- Hebrew name
- English phonetic pronunciation
So you can:
- Order the result by "Hebrew name" field or "English phonetic pronunciation" field.
- Display the above two fields separate lines easily.
I really want them in one field, the sorting is not important as long as the Hebrew and English phonetic are together in one string.
Thanks
David
I assume we are talking about this:
In a single line field, you are using below field value:
אבגד Abcd
In front-end, you are going to display the value as separate lines, like below:
אבגד
Abcd
If it is, there isn't such kind of built-in feature within Toolset Types plugin, Types shortcode can only output the field values, it can not add the separate lines.
You might consider other workaround, for example, put HTML codes into the single line field value manually:
Then display above single line field with Types shortcode:
https://toolset.com/documentation/customizing-sites-using-php/functions/#textfield
More help:
hidden link
Hi Luo,
I want them in 1 field on the same line, so I can display them in a list box and don't have to worry about matching the styles.
Here's an example of how I want it to appear
hidden link
If it was 1 string I wouldn't have to worry about lining up the text or worrying that the phonetic matched the Hebrew text.
Thanks
David
My issue is resolved now. Thank you!