Changes

Translating Web Page Views

1,156 bytes added, 19:03, 25 June 2014
System Variables
There are a number of different techniques that can be used to translate [[Web Page View]] fields into various other [[language]]s.
These methods can also be used for custom HTML portals.
Most often The first option (Custom Field Translation) is a standalone solution, not used with the other options listed. When '''Custom Field Translation''' is not used then a combination of these the other techniques is normally most appropriate. 
=Custom Field Translation=
Web Page View fields can be translated in the same manner as other custom fields: using the '''Language Settings''' option on the custom field.
<!--@end-->
</pre>
 
If you are providing translation for a discreet number of languages it may be better to code one of the languages as default so if the user has a langid that is NOT accommodated by your code:
</pre>
If you are already using sslogic in the document and cannot use nested sslogic, you may use sslogic on CSS classes to hide the relevant HTML as follows:
<pre>
<!--@sslogic("@me.langid@"=1)-->
.french {
display:none;
}
<!--@end-->
 
<!--@sslogic("@me.langid@"=6)-->
.english {
display:none;
}
<!--@end-->
</pre>
HTML code:
<pre>
<span class="english">Project Details</span>
<span class="french">Les Détails du Projet</span>
</pre>
* All content is visible when you are editing the Web Page View settings, so easily managed
===Cons===
* If you are working with a large Web Page View this technique can quickly become unwieldy as all content is duplicated for each language. * If you are already using blocks of sslogic on the Web Page View you will not be able to nest the sslogic for translating text inside these blocks
* It is NOT suitable for translation into 3 or more languages.
 
=Language Library and ssTranslate=
=System Variables=
Using '''@system2.''' to pre-process the system variable name to include the current user's [[Language]] you can populate the Web Page View {{WPV}} with variable content.
On the Web Page View you using would use the following syntax:
@system2.Test Table-@me.langid@@
* When editing the Web Page View settings the contents are not visible without referencing the system variables.
===Note===
* When using system variables extensively, or when translating to 3 or more languages it is best practice to create a [[UTA]] called '''Translation Manager''' which facilitates creating of the many system variables and languages using [[Pandora]]. Current clients may contact [[SmartSimple Support]] or your account manager for further information.
 
 
==See Also==
* [[Convert Special Characters to PDF]]
[[Category:Translation]]
8,849
edits