Interface: DataLocaleProvider
Defined in: src/editor/dataLocaleProvider.ts:15
Provides the methods to format the graph data according to the current language.
See
DefaultDataLocaleFormatter
Methods
formatEntityLabel()
formatEntityLabel(
entity,language):string
Defined in: src/editor/dataLocaleProvider.ts:34
Formats a graph entity label.
Parameters
| Parameter | Type | Description |
|---|---|---|
| entity to format label for | |
|
| target language code |
Returns
string
formatEntityTypeList()
formatEntityTypeList(
entity,language):string
Defined in: src/editor/dataLocaleProvider.ts:41
Formats a graph entity types into a list.
Parameters
| Parameter | Type | Description |
|---|---|---|
| entity to format type list for | |
|
| target language code |
Returns
string
formatIri()
formatIri(
iri):string
Defined in: src/editor/dataLocaleProvider.ts:27
Formats an IRI (unique identifier) for a graph content item.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
string
prepareAnchor()
prepareAnchor(
targetIri):Pick<React.ComponentProps<"a">,"draggable"|"href"|"target"|"rel"|"onClick">
Defined in: src/editor/dataLocaleProvider.ts:45
Provides props for an anchor (<a> link) to a resource IRI.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
Pick<React.ComponentProps<"a">, "draggable" | "href" | "target" | "rel" | "onClick">
resolveAssetUrl()
resolveAssetUrl(
assetIri,options):Promise<string>
Defined in: src/editor/dataLocaleProvider.ts:52
Asynchronously resolves an IRI/URL to referenced data asset for display or download, e.g. an image (thumbnail) or a downloadable file.
Parameters
| Parameter | Type |
|---|---|
|
|
| { |
|
|
Returns
Promise<string>
selectEntityImageUrl()
selectEntityImageUrl(
entity):undefined|string
Defined in: src/editor/dataLocaleProvider.ts:23
Selects a preferred image URL for an entity.
Parameters
| Parameter | Type |
|---|---|
|
Returns
undefined | string
selectEntityLabel()
selectEntityLabel(
entity): readonlyLiteral[]
Defined in: src/editor/dataLocaleProvider.ts:19
Selects a preferred set of localized labels for an entity.
Parameters
| Parameter | Type |
|---|---|
|
Returns
readonly Literal[]