(no commit message)
[openafs-wiki.git] / TWiki / TWikiPluralsDotPm.mdwn
1 # <a name="Package &lt;code&gt;TWiki::Plurals="></a> Package =TWiki::Plurals
2
3 Handle conversion of plural topic names to singular form.
4
5 <div>
6   <ul>
7     <li><a href="#Package =TWiki::Plurals="> Package TWiki::Plurals</a><ul>
8         <li><a href="#StaticMethod <strong>singularForm</strong> ($we"> StaticMethod singularForm <tt>($web,$pluralForm) -&gt; $singularForm</tt></a></li>
9       </ul>
10     </li>
11   </ul>
12 </div>
13
14 ## <a name="StaticMethod &lt;strong&gt;singularForm&lt;/strong&gt; ($we"></a> [[StaticMethod]] **singularForm** `($web,$pluralForm) -> $singularForm`
15
16 Try to singularise plural topic name.
17
18 - `$web` - the web the topic must be in
19 - `$pluralForm` - topic name
20
21 Returns undef if no singular form exists, otherwise returns the singular form of the topic
22
23 [[I18N]] - Only apply plural processing if site language is English, or if a built-in English-language web (Main, TWiki or Plugins). Plurals apply to names ending in 's', where topic doesn't exist with plural name.
24
25 Note that this is highly langauge specific, and need to be enabled on a per-installation basis with $TWiki::cfg\{PluralToSingular\}.