What kind of path type is used for i18n?

Home Forums kbmMW What kind of path type is used for i18n?

Viewing 1 reply thread
  • Author
    Posts
    • #56729
      mrluigi2017
      Participant

      Hi,

      What kind of path type is used in the example below? Does it have a name?

      i18n.Save(”, ‘json’, ‘file:..\\..\\Translations.json’);

      Thanks in advance!

       

      Kind regards,

      Luigi

    • #56742
      kimbomadsen
      Keymaster

      Hi,

      The ASettings argument is simplified YAML format. It use a property: value scheme where the property name and value follows the YAML syntax for strings.

      YAML strings only needs to be quoted if there can be a misunderstanding of the strings composition.
      Check this link for more info.
      https://stackoverflow.com/questions/19109912/yaml-do-i-need-quotes-for-strings-in-yaml

      The ASettings content depends on the storage type.
      In case of the JSON and YAML storage types currently bundled with kbmMW, they accept property names: file, encoding and ignoreMissingFile, where file is a string path to the file to contain the i18n storage, encoding either utf-8 or utf-16 and ignoreMissingFile either true or false (default false). If true, no exception will be thrown trying to load a non existing storage file.

      If you would want to make a new custom i18n database bound storage, the ASettings property would probably include a connection string to the database along with other relevant properties.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.