November Happy Hour will be moved to Thursday December 5th.

Selection Element Placeholder Text Translation

Vote:
 

Hi 

I have a form with a Selection element,

In that, I see the default Placeholder text is displaying as "-- Select an option --", (I'm not sure from where it's coming)

My problem is the default Placeholder is not translating for Portuguese, however, it's automatically translating for Spanish, Deutsch,..

I'm not sure I can translate this Placeholder, can Someone have any idea about this issue.?

I tried to use the custom text in the Placeholder textbox, but it's not translated for any languages.

Also, we are using the organic Optimizely Selection. (No customization)

Thank you,

Hari

#284954
Aug 04, 2022 17:12
Vote:
 

Hello,

The placeholder text can be translated/customized by using a XML language file. Create any XML file such as Forms.xml in the /Lang folder of your solution. The following snippet is an example of how you can override the default placeholder text of the Selection element for the English language. 

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<languages>
	<language name="English" id="en">
		<episerver>
			<forms>
				<viewmode>
					<selection>
						<!--Update the values here to override-->
						<selectanoption>-- Select an option --</selectanoption> 
						<selectoptions>-- Select options --</selectoptions>
					</selection>
				</viewmode>
			</forms>
		</episerver>
	</language>
</languages>

I do not have the Portugues language configured so that's why I'm using English as an example. However to do this for Portugues simply update the values in the <language> element. You can find more details about the translation files and how to use them in the documentation here:
https://docs.developers.optimizely.com/content-cloud/v11.0.0-content-cloud/docs/localizing-the-user-interface

Cheers 😄

#284959
Edited, Aug 05, 2022 1:29
Harinarayanan - Aug 19, 2022 13:33
Thank you Ynze.. The above solution works..
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.