Demo for language tag

omeka_auth = OmekaAPIClient(
    # api_url='https://timsherratt.org/collections/api',
    api_url=os.getenv('API_URL'),
    key_identity=os.getenv('KEY_IDENTITY'), 
    key_credential=os.getenv('KEY_CREDENTIAL'),
    use_cache=False
)
test_item = {
    'schema:name': [
        {
            'value': 'My first resource!',
            "lang": "ja"
        }
    ]
}
payload = omeka_auth.prepare_item_payload(test_item)
payload
{'schema:name': [{'property_id': 2922,
   'type': 'literal',
   '@value': 'My first resource!',
   '@language': 'ja'}]}
new_item = omeka_auth.add_item(payload)
new_item
{'@context': 'https://omekas.aws.ldas.jp/sandbox/api-context',
 '@id': 'https://omekas.aws.ldas.jp/sandbox/api/items/8024',
 '@type': 'o:Item',
 'o:id': 8024,
 'o:is_public': True,
 'o:owner': {'@id': 'https://omekas.aws.ldas.jp/sandbox/api/users/1',
  'o:id': 1},
 'o:resource_class': None,
 'o:resource_template': None,
 'o:thumbnail': None,
 'o:title': None,
 'thumbnail_display_urls': {'large': None, 'medium': None, 'square': None},
 'o:created': {'@value': '2022-11-15T04:06:06+00:00',
  '@type': 'http://www.w3.org/2001/XMLSchema#dateTime'},
 'o:modified': {'@value': '2022-11-15T04:06:06+00:00',
  '@type': 'http://www.w3.org/2001/XMLSchema#dateTime'},
 'o:media': [],
 'o:item_set': [],
 'o:site': [{'@id': 'https://omekas.aws.ldas.jp/sandbox/api/sites/1',
   'o:id': 1},
  {'@id': 'https://omekas.aws.ldas.jp/sandbox/api/sites/2', 'o:id': 2}],
 'schema:name': [{'type': 'literal',
   'property_id': 2922,
   'property_label': 'name',
   'is_public': True,
   '@value': 'My first resource!',
   '@language': 'ja'}]}