question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ x ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request

HI!

Is there a possibility to load and use only one single custom json object for the translations over http? the structure of the json object returned by the webservice looks like:

en
  word: translation
  word2: translation
nl
  word: translation
  word2: translation

Thanks in advance!

Regards, Martin

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
deegcommented, Feb 24, 2017

You could probably already achieve this if you wanted to, although I haven’t tried.

Take a look at the translation service methods for setTranslation.

You could probably just get ahold of the JSON file and manually set the translations yourself in JS.

0reactions
CodeAndWebcommented, Mar 29, 2018

Loading the translations manually and using setTranslation is the easiest way to get this done.

You could also create a custom loader. Load the file once and keep it in memory. Return the sub-object that matches the language when the loader gets asked for it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing a Single JSON File in Databricks - Advancing Analytics
Writing a Single JSON File in Databricks. When writing to a JSON destination using the DataFrameWriter the dataset is split into multiple files ......
Read more >
JSON Files - Spark 3.3.1 Documentation
Property Name Default Scope primitivesAsString false read prefersDecimal false read allowComments false read
Read more >
Efficiently Converting Multiple JSON Files Into A Single ...
In this post, I'm going to show you how to take multiple JSON files and convert them into a single DataFrame. Well, I'm...
Read more >
JSON file | Databricks on AWS
You can read JSON files in single-line or multi-line mode. In single-line mode, a file can be split into many parts and read...
Read more >
Plain JSON data - NIEM GitHub
Although a JSON file may be any value, a JSON file usually consists of a single object, possibly containing other objects. For example:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found