Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
I ran into an issue that I need help with.
I have a categories column that displays text in German and English as one string. Instead of showing both languages I would like to use a language switch to only display one language at a time.
The field records look like this:
"01 Text in German / Text in English"
"02 Text in German / Text in English"
I would like to show either 01 Text in German or 01 Text in English
I already use a Translation-Table coming from Excel but only for column names. And here I already have the names but I don't know how I could switch a field record based on language selection.
My only guess is to create another column that is shown or hidden based on the language selection.
How can I extract the languages in above format?
I can use subfield(categories, '/') but then I loose the numbering in the front.
Thanks for your help.
This is one of those multi-language tricks. Follow these steps:
No click the different languages and see what happens in the listbox. You can apply the same trick to columns in straight tables or table boxes as well. See example below.
Peter
Hi,
Can you upload some of the possible values of the Categories Column? So that we can find some pattern to achieve your goal.
If all the possible values are in your above given example format then you can use like below
Left(Categories,2) & SubField(Mid(Categories,4),'/') as Category
This is one of those multi-language tricks. Follow these steps:
No click the different languages and see what happens in the listbox. You can apply the same trick to columns in straight tables or table boxes as well. See example below.
Peter
BTW the same example above contains the necessary text-splitting-code for your strings. Have a look at the script.
Peter
Try like:
Load
SubField(YourField, '/', 1) & ' Or ' & Letf(YourField,2) & ' ' & SubField(YourField, '/', 2) as NewField
You could try
Subfield(categories, '/', 1) for German
Subfield(categories, ' ', 1) & ' ' & Subfield(categories, '/', 2) for English
Hi,
You can try like below in your load script.
SubField(Field,' ', 1) as LanguageID,
Right( SubField(Text,'/', 1), Len(SubField(Text,'/', 1))- len(SubField(Text,' ', 1))) as GermanText,
SubField(Text,'/', 2) as EnglishText.
thank you everyone for your posts. Give me a day or two to play with those different possibilities.