Developer Forum

Ask a Question
ANSWERED

Forgot to remove a console.log?

We found a console.log that seems to log every part marked with notranslate ![](https://files.readme.io/416b31a-image.png) ![](https://files.readme.io/8b9333a-image.png)
ANSWERED

How to connect translater widget with sub domain

created a sub domain A record of hi in server (AWS router 53) , by adding mannually the language is translating but i need to connect to the widget when the user clicks on hindi tab that time, sub domain hi is automatically add to the url and when i click on english tab the hi sub domain remove and translate from hindi to english to achive this behaviour i crated cutomized widget following are the code: <p style={{position:"fixed",right: 29, bottom: 79,zIndex: 999,background: "black", textAlign: "center", color: "white",width:115,fontFamily: "GalanoGrotesqueMedium",fontSize:15,padding:9,borderRadius: "10px 10px 0px 0px"}}>Select Language</p> <div style={{position:"fixed",right: 30, bottom: 18,zIndex: 999,background: "#5E9781", textAlign: "center",width:115, fontFamily: "GalanoGrotesqueMedium",fontSize:15,padding:9,borderRadius: "0px 0px 10px 10px"}}> <a id="hindi-tab" href='javascript:Localize.setLanguage("hi")'>हिन्दी</a> <br /> <hr /> <a id="english-tab" href='javascript:Localize.setLanguage("en")'>English</a> </div> hindi tab working perfeclty but for the first time when i first click on english sub domain removes for the second click the language is changing how to make it to single click responce.
ANSWERED

How to exclude localize from translating an angular widget that launches from our website

We launch an angular widget which has its own translating capabilities and would like to exclude this from our website from being detected by the localize script. Using a notranslate attribute or ignore attribute have been tried and do not work. We notice the widget application becomes extremely slow to respond when the localize script is active. Please suggest a solution to exclude the angular widget from being detected/operated on by the localize script altogether. Regards, Santosh
ANSWERED

maximum length of a phraseKey?

How long can a phrase key be? and what are the character limitations? are there any banned characters?
ANSWERED

Can't get Localize.on("initialize") to fire after initialization

I'm trying to use the `on initialize` example that is mentioned in the docs: https://developers.localizejs.com/docs/library-api#initialize-1 ```js Localize.on("initialize", function(data) { console.log("initialize: "); console.log(data); }); ``` Here's my full script: ```js (function(d, script) { script = d.createElement('script'); script.type = 'text/javascript'; script.async = true; script.onload = function(){ !function(a){if(!a.Localize){a.Localize={};for(var e=["translate","untranslate","phrase","initialize","translatePage","setLanguage","getLanguage","detectLanguage","getAvailableLanguages","untranslatePage","bootstrap","prefetch","on","off","hideWidget","showWidget","getSourceLanguage"],t=0;t<e.length;t++)a.Localize[e[t]]=function(){}}}(window); Localize.initialize({ key: 'xxx', rememberLanguage: true, saveNewPhrasesFromSource: true, }); Localize.on("initialize", function(data) { console.log("initialize: "); console.log(data); }); }; script.src = 'https://global.localizecdn.com/localize.js'; d.getElementsByTagName('head')[0].appendChild(script); }(document)); ``` Right now ` Localize.initialize` works and I'm able to see the widget. The only thing not working is ` Localize.on("initialize", function(data) {`. It never fires the console.logs. Thanks.
ANSWERED

Specify variable within a meta tag

Because I see no way of defining a variable without using a <var> tag which is not possible. So our dynamic application with hundreds of thousands of titles all require a separate translation, right ?
ANSWERED

Unable to write Unit test cases for Localize methods and its failed with issue

I have used localizejs on my Angular project and I started writing unit test cases for all my components but it failed with the below error as Localize global variable is found undefined on spec files. Error: ReferenceError: Localize is not defined Let me know if I am doing any wrong implementation of my test cases in respect to Localize. Thanks
ANSWERED

Can we create a way to avoid sending filenames to the dashboard

Is there a way as a developer when writing the website without access to the dashboard that I can avoid the phrases I am writing from being sent to the localise.js dashboard? For example, filenames or system logs should not be sent to the localize dashboard.
ANSWERED

Is Localize compatible with SSRS?

We have SSRS reports generated in our application, but localize does not identify the words inside report. How can we go about it?
ANSWERED

Identify language

Is there any way where whenever we change the language in application by Localize widget, an event must be fired so that according to the language set, I can do changes to my UI or content?