Coder Social home page Coder Social logo

Comments (4)

bseddon avatar bseddon commented on July 17, 2024

Yes, creating a custom descendant of the XBRL class is the way I has imagined users will set a language but I guess that does not work so well if you have more than one language as both cannot be default.

I am reluctant to add a parameter. Not because its a bad idea but because then all the sub functions to the point that the language argument value is used also need to be updated. This means a whole load of retesting,

Plus I don't have examples of formulas with messages in languages other than English. OK, I do now you have shown me the BE taxonomy but I don't have any corresponding instance documents I can use to exercise the formulas so I am unable to validate any changes made.

At the moment XBRL class just returns the locale string 'en-US'. So I've modified the XBRL class to expose a static property called 'specificLanguage'. The 'getDefaultLanguage' function has been modied to use this property value, if set, or otherwise return a default. Like this:

public static $specificLanguage = null;

public function getDefaultLanguage()
{
    if ( self::$specificLanguage ) return self::$specificLanguage;
    return 'en-US';
}

The property needs to be static so that all taxonomies created can share the same setting. Then it can be used like:

XBRL::$specificLanguage = 'be-FR';
$formulas->processFormulasAgainstInstances($instance);

This modification has been uploaded to the dev branch.

from xbrl.

tim-vandecasteele avatar tim-vandecasteele commented on July 17, 2024

@bseddon perfect, this is more or less what I did myself.

Would you care for me crafting an example instance document for the BE taxonomy to add to the testcases?

from xbrl.

bseddon avatar bseddon commented on July 17, 2024

I'd really appreciate it if you are able to create a sample instance document to test against or even just follow along with some of your concerns. If there is a cache of instance documents submitted to the regulator, that would be OK as well.

from xbrl.

tim-vandecasteele avatar tim-vandecasteele commented on July 17, 2024

I submitted one in the other issue. Sadly these documents are not disclosed, so you cannot get filled in instance documents from the regulator.

from xbrl.

Related Issues (15)

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.