Giter Site home page Giter Site logo

Get Translation Label about xbrl HOT 3 CLOSED

cicoph avatar cicoph commented on August 27, 2024
Get Translation Label

from xbrl.

Comments (3)

adrianclay avatar adrianclay commented on August 27, 2024

Hey Francesco,

The Set::getArcsFromConcept method might be useful, it returns all Arcs which you can filter on instanceof Label\Arc and then use the getLabels() method on those objects to get the associated Labels[]. Each Label object has a getLang and getContent method.

from xbrl.

cicoph avatar cicoph commented on August 27, 2024

Hi Adrian, thank you for your reply 👍 it works :)

I have another question: it is possible to get the "role" of attributes when import a xbrl file? I need to separate the General Info from bilance info value. To do this I think that I need to get the role of attribute from an xml file (itcc-ci-pre-info-2014-11-17.xml) like for the labels translation. This file contain this rows:

<linkbase xmlns="http://www.xbrl.org/2003/linkbase" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <roleRef xlink:type="simple" xlink:href="itcc-ci-roles-2014-11-17.xsd#InfoGenerali" roleURI="http://www.infocamere.it/itnn/fr/itcc/role/InfoGenerali"/> 
.....

Let me know what do you think about if you can.
Thank you :)

from xbrl.

adrianclay avatar adrianclay commented on August 27, 2024

Hey again,

I've made some modifications in commit f3e38a4 to make this possible. You can now get all the ArcCollection objects by calling Set::getArcCollections(). Each ArcCollection has a role associated, which you can retrieve by calling the ArcCollection::getRole() method.

So for example, if I wanted to find all the arcs with a role of "http://www.infocamere.it/itnn/fr/itcc/role/InfoGenerali" I would do the following.

foreach( $set->getArcCollections() as $collection ) {
  if ( $collection->getRole() == "http://www.infocamere.it/itnn/fr/itcc/role/InfoGenerali" ) {
    foreach( $collection as $arc ) {
      echo $arc->getTitle(), "\n";
    }
  }
}

from xbrl.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.