টেমপ্লেট:Infobox person/length/locate/নথি
এটি টেমপ্লেট:Infobox person/length/locate-এর জন্য একটি নথির উপপাতা। এখানে ব্যবহার সংক্রান্ত তথ্য, বিষয়শ্রেণী এবং অন্যান্য সামগ্রী রয়েছে যা মূল টেমপ্লেট পাতার অংশ নয়। |
টেমপ্লেট:Infobox person/length/locate is one of three templates used to automatically add conversions of length measurements displayed by infoboxes, such as the |reach=
parameter in {{Infobox boxer}}
.
- Template:Infobox person/length changes text for units of length to the abbreviations "cm" or "in", then passes the string to:
- Template:Infobox person/length/locate which replaces any instances of
with a space, and determines the positions of "cm" or "in" within that string, all of which is passed to: - Template:Infobox person/length/switch which does the conversion
Usage[সম্পাদনা]
{{Template:Infobox person/length/locate|198 cm}}
→ ১৯৮ সেমি (৭৮ ইঞ্চি){{Template:Infobox person/length/locate|198 cm}}
→ ১৯৮ সেমি (৭৮ ইঞ্চি){{Template:Infobox person/length/locate|78 in}}
→ 78 in{{Template:Infobox person/length/locate|78 in}}
→ 78 in{{Template:Infobox person/length/locate|198 cm (2012)}}
→ ১৯৮ সেমি (৭৮ ইঞ্চি) (2012){{Template:Infobox person/length/locate|78 in (2012)<ref>citation goes here</ref>}}
→ 78 in (2012)[১]
- ↑ citation goes here
Exceptions[সম্পাদনা]
Does not replace numbers in hard-coded conversions (examples intentionally show incorrect conversions):
{{Template:Infobox person/length/locate|198 cm (71 in)}}
→ 198 cm (71 in){{Template:Infobox person/length/locate|78 in (191 cm)}}
→ 78 in (191 cm)
Does not replace numeric output of conversion templates such as {{convert}} (examples have precision different than usual):
{{Template:Infobox person/length/locate|{{convert|198|cm|in|2|abbr=on}}}}
→ ১৯৮ সেমি (৭৭.৯৫ ইঞ্চি){{Template:Infobox person/length/locate|{{convert|78|in|cm|1|abbr=on}}}}
→ ৭৮ ইঞ্চি (১৯৮.১ সেমি)
Technical details[সম্পাদনা]
The following example shows how the template works:
{{Infobox person/length/switch |{{{1|198 cm}}} |{{#invoke:String|replace|{{{1|198 cm}}}| | }} |c={{#invoke:String|find|{{#invoke:String|replace|{{{1|198 cm}}}| | }}|cm}} |i={{#invoke:String|find|{{#invoke:String|replace|{{{1|198 cm}}}| | }}|in}} }}
Result:
{{Infobox person/length/switch
|198 cm
|198 cm
|c=5
|i=0
}}
See also[সম্পাদনা]