Template:CodeBox
The {{CodeBox}}
template is used to hide and display a code snippet, to reduce page length for the average user.
Usage
Usage: {{CodeBox|This text will be hidden}}
This text will be hidden
Examples
The below is an example of typical usage alongside {{CodeSnip}}
.
{{CodeBox | {{CodeSnip | lang = java | line = true | start = 92 | source = items.txt | retrieved = true | version = 41.78.16 | code = item BucketEmpty { DisplayCategory = WaterContainer, Weight = 1, CanStoreWater = TRUE, Type = Normal, DisplayName = Bucket, Icon = MetalBucket, ReplaceOnUseOn = WaterSource-BucketWaterFull, MetalValue = 20, RainFactor = 1, Tooltip = Tooltip_item_RainFromGround, EatType = Bucket, SurvivalGear = TRUE, WorldStaticModel = Bucket_Ground, } }} }}
Produces:
Source: ProjectZomboid\media\scripts\items.txt
item BucketEmpty
{
DisplayCategory = WaterContainer,
Weight = 1,
CanStoreWater = TRUE,
Type = Normal,
DisplayName = Bucket,
Icon = MetalBucket,
ReplaceOnUseOn = WaterSource-BucketWaterFull,
MetalValue = 20,
RainFactor = 1,
Tooltip = Tooltip_item_RainFromGround,
EatType = Bucket,
SurvivalGear = TRUE,
WorldStaticModel = Bucket_Ground,
}
How to translate
This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:
- Create a subpage of this template with the language code of the language you want to translate to.
- Copy the code wrapped in the
<noinclude>
tag in this template into the page you created.{{Translation guide}}
template should be removed from the translated documentation.
- Translate the page according to the translation requirements of normal pages.