Difference between revisions of "FormatISBN13"
From Sega Retro
(Created page with "<includeonly><div style="display:none;">{{#vardefine:isbn13raw|{{#replace:{{{1|}}}|-||}}}}{{#vardefine:isbn13raw|{{#replace:{{#var:isbn13raw}}| ||}}}} {{#ifexpr:{{#len:{{#var:...") |
|||
Line 12: | Line 12: | ||
{{#vardefine:isbn13|{{#var:gs1}}-{{#var:region}}-{{#var:everythingelse}}-{{#var:checkdigit}}}} | {{#vardefine:isbn13|{{#var:gs1}}-{{#var:region}}-{{#var:everythingelse}}-{{#var:checkdigit}}}} | ||
− | </div>{{#var:isbn13}}</includeonly><noinclude> | + | </div>{{#ifeq:{{{link|}}}|yes|[http://www.worldcat.org/isbn/{{#var:isbn13}} {{#var:isbn13}}]|{{#var:isbn13}}}}</includeonly><noinclude> |
Template for formatting ISBN-13 numbers. Hypens and spaces are stripped out at the start. | Template for formatting ISBN-13 numbers. Hypens and spaces are stripped out at the start. | ||
Line 24: | Line 24: | ||
==Examples== | ==Examples== | ||
− | <pre>{{FormatISBN13|978-4073055501}}</pre> | + | <pre>{{FormatISBN13|978-4073055501|link=yes}}</pre> |
− | {{FormatISBN13|978-4073055501}} | + | {{FormatISBN13|978-4073055501|link=yes}} |
Revision as of 14:45, 1 May 2019
Template for formatting ISBN-13 numbers. Hypens and spaces are stripped out at the start.
The format for ISBN-13 is
[978/979]-[region]-[publisher]-[title]-[checkdigit]
the region is a fixed length (depending on where it came from), but the publisher and title fields can be any length, so they're currently grouped together.
Examples
{{FormatISBN13|978-4073055501|link=yes}}
{{FormatISBN13|9785073 055501}}
978-50-73 0555-01