Hello
I have created custom fields in produkt page, where we can add file url. They are displayed as button and will open in new window – that is all working.
There are 7 files per languagae and my customer would like to insert them all (all languages files )in main language. So rather to translate them – they would like to insert them at once.
But that means that if there is 4 languages, in admin area will be inserted 28 files...
So is there possibility to display for example only english files in english page, russian files in russian page etc. How to do that?
And other question
Is there a way ( tutorial ) to display files Button as dropdown menu?
If you want to manage all the fields in the primary language without translation, you can use WPML String Translation and the wpml-string shortcode. For example, in the Content Template for your custom post type, insert the 4 primary language fields in a wpml-string shortcode:
[wpml-string context="your-theme-context"]Language 1 field 1: [types field='lang-1-field-slug-1'][/types][/wpml-string]
[wpml-string context="your-theme-context"]Language 1 field 2: [types field='lang-1-field-slug-2'][/types][/wpml-string]
[wpml-string context="your-theme-context"]Language 1 field 3: [types field='lang-1-field-slug-3'][/types][/wpml-string]
[wpml-string context="your-theme-context"]Language 1 field 4: [types field='lang-1-field-slug-4'][/types][/wpml-string]
...
Then in WPML String Translation, you can edit this string into different languages:
Language 2 field 1: [types field='lang-2-field-slug-1'][/types]
Language 2 field 2: [types field='lang-2-field-slug-2'][/types]
Language 2 field 3: [types field='lang-2-field-slug-3'][/types]
Language 2 field 4: [types field='lang-2-field-slug-4'][/types]
...
Language 3 field 1: [types field='lang-3-field-slug-1'][/types]
Language 3 field 2: [types field='lang-3-field-slug-2'][/types]
Language 3 field 3: [types field='lang-3-field-slug-3'][/types]
Language 3 field 4: [types field='lang-3-field-slug-4'][/types]
...
Language 4 field 1: [types field='lang-4-field-slug-1'][/types]
Language 4 field 2: [types field='lang-4-field-slug-2'][/types]
Language 4 field 3: [types field='lang-4-field-slug-3'][/types]
Language 4 field 4: [types field='lang-4-field-slug-4'][/types]
...
... and so on.
Is there a way ( tutorial ) to display files Button as dropdown menu?
This would require your own custom HTML, CSS and JavaScript code. The Bootstrap library offers a dropdown menu you can use: https://getbootstrap.com/docs/3.3/components/#btn-dropdowns
You can enable Bootstrap in Toolset > Settings > General. Then you would have to use custom JavaScript to respond to the select event.