HelpTranslating with parameters
Translating with parameters
Sprawk contains a lot of artificially intelligent algorithms to detect patterns in your web page content and automatically find the best translation or pattern.
Occasionally you will want to give Sprawk some hints about pattern parameter. This can also speed up processing and detection of patterns. It is particular useful when you have pages that are generated dynamically from a database.
For example, you may have a heading on your site in English:
Resources for Korea, Dem. People's Republic of
and a pattern:
Resources for {0}
which has a translation.
Sprawk may struggle since it's unclear that the full stop after Dem does not indicate the end of a sentence.
You can change your code to wrap the country name like this:
Resources for <span class="sprawk-param">Korea, Dem. People's Republic of</span>
This gives Sprawk a hint that "Korea, Dem. People's Republic of" is special parameter inside a pattern can be translated as a unit. If a translation if missing, it will be recorded separately making translation management and reuse easier.
blog comments powered by Disqus
