xml,actionscript-2,locale,multilingualRelated issues-Collection of common programming errors
cpu2007
xml spring configuration
I hope someone can help me with this issue. I have uploaded the spring example that I’m working on so that it will be easier to understand what I’m trying to achieve.Basically I want to creata a spring web restful service and I’m trying to put pieces together. I have manged to use jpa,I can call the database (mysql) and get data; I tested this using the Main class. Now I want to add an interface(index.html) and use controller to retrieve data from the database(restful service) However, I’m havin
James Meade
android xml validation xml-schema xerces
I am trying to validate an XML file against an XML Schema file and I have downloaded the https://code.google.com/p/xerces-for-android/ library to get XML Schema validation to work and I have created the project as a library. I am having trouble getting it to work properly for Android and I get the ‘FileNotFoundException’ error and if anyone can see what I am doing wrong or what I need to do to get it to work, then please can you help me.Here is the code:public void xmlValidator() throws IOExcept
Robert Oschler
android xml eclipse android-layout adt
For quite a while my Eclipse environment with the Android plug-in was running smoothly. Somewhere along the line of updates applied during the Software updates process it broke. The first problem that started happening was the loss of the “button” Form Widget graphics when running the Android plug-in Graphical Editor for layout files. I get the following related errors in the Error log:!MESSAGE voice_recog.xml: android.webkit.WebView !MESSAGE main_new.xml: Failed lot load /Developer/android-s
psct
android xml sax
I use XOM to create XML on android, it’s worked, but when I have tried to parse some xml with XOM’s Builder I have an error:11-28 22:00:11.290: I/dalvikvm(26548): Could not find method org.apache.xerces.impl.Version.getVersion, referenced from method nu.xom.Builder.<clinit> 11-28 22:00:11.290: W/dalvikvm(26548): VFY: unable to resolve static method 5819: Lorg/apache/xerces/impl/Version;.getVersion ()Ljava/lang/String; 11-28 22:00:11.290: D/dalvikvm(26548): VFY: replacing opcode 0x71 at 0x0
Veger
java xml unzip
I need to unzip a zipped directory containing different files’ format like .txt, .xml, .xls etc.I am able to unzip if the directory contains only .txt files but it fails with other files format. Below is the program that I am using and after a bit of googling, all I saw was similar approach -import java.io.*; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile;public class ZipUtils {public static void extractFile(InputStream inStream, OutputStream outStream)
uckelman
java xml xml-parsing
I have spring mvc project in whicn I upload xml file and try to write it to the my xml by DOM, but confront with this exception. When I make attempts to do the same proccesses in usual project – all works fine. Can’t understand why it happens.. type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.Nul
MRalwasser
java xml jaxb xerces jaxp
(Question UPDATED, see below)On Java 7, I use JAXP in order to parse a XML.Surprisingly, it turned out that during XML Schema validation, the built-in implementation xerces issues a http request in order to resolve some stuff (which fails).Question: Is there a way to disable (any) http requests in JAXP?org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 19; schema_reference.4: Failed to read schema document ‘http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd’, because 1) could not find th
mark
.net xml xml-serialization
Consider this type:[DataContract]public class EntityId{[DataMember(Order = 1)]public string IdAsString { get; set; }[DataMember(Order = 2)]public Type Type { get; set; }}I created an Xml serializer assembly for it. However, trying to serialize it yeilds an exception:System.InvalidOperationException occurredMessage=The type NC.DTO.FlowFolder was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.Source=NC.DTO.XmlSerializersStackTrace:at Micros
brelian
xml xslt xsd wsdl mule
this is my .xslt file :<?xml version=’1.0′ ?> <xsl:stylesheet version=”2.0″xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/”xmlns:s=”http://www.w3.org/2001/XMLSchema”><xsl:output method=”xml” version=”1.0″ encoding=”UTF-8″ omit-xml-declaration=”yes” indent=”yes” /><xsl:param name=”remoteClientAddress” /><xsl:variable name=”remoteClientAddressTrimmed”select=”substring-before(substring-after($remoteClientAddress, ‘/’), ‘:’)” /
chepiov
java xml servlets xsd jaxp
I have servlet which uses utility packaged in .jar archive:@Override public void init() throws ServletException {…try (InputStream stream = getClass().getResourceAsStream(“/fileToParse.xml”)) {App.check(stream);} catch (Exception e) {throw new ServletException(e);}… }This utility takes xml file stream, performs validation against xsd schema and parses it:public class App {private static final String JAXP_SCHEMA_LANGUAGE = “http://java.sun.com/xml/jaxp/properties/schemaLanguage”;private stati
Cherniv
actionscript-3 actionscript-2
I currently have some code from here (https://github.com/jmhnilbog/Nilbog-Lib-AS2/blob/master/mx/mx/remoting/NetServiceProxy.as) which converts a function into a function. This code is shown below:private var _allowRes:Boolean= false;function __resolve( methodName:String ):Function {if( _allowRes ) {var f = function() :Object {// did the user give a default client when he created this NetServiceProxy? if (this.client != null) {// Yes. Let’s create a responder object.arguments.unshift(new NetServ
user2817200
actionscript-3 flash actionscript actionscript-2
In flash, I created a button and gave the button this code (in AS1-AS2)on (release) {gotoAndPlay(5);tellTarget(“/Anim”) //’Anim’ is just short form for ‘an animation'{gotoAndPlay(5);} // End of TellTarget }Since you can’t give specific buttons actions in AS3, I gave the button an instance name (the buttons instance name is now ‘runButton’) and then decided to do this in the actions layer.runButton.addEventListener(MouseEvent.CLICK, startAnimation);function startAnimation(event:MouseEvent){gotoAn
danwoods
flash actionscript command-line actionscript-2
I’m adding a small .swf object (XSPF Web Music Player) to a site I’m working on. I need to add two lines of code to make external javascript calls, so, I guess I need to re-compile to actionscript (please forgive me, I’m extremely new to flash). I’m using MTASC to compile at the command line. I’m getting errors at the start of the file, pretty much at the first thing not-commented. The .as file is posted here http://pastebin.com/f3c4a4a03 and it produces an error(characters 0-4 : parse error Une
Cherniv
actionscript-3 actionscript-2 flashdevelop
I have this code written in ActionScript 3 :private function _initializeUI() {function onClick(e : Event) {var checkBox : CheckBox = CheckBox(e.target);Chat.sendToClient(“checkBox pressed : ” + checkBox.name);switch(checkBox.name) {case “autoHealCheckBox”:checkBox.checked = !checkBox.checked;_settings.walle.autoHeal = checkBox.checked;break;case “autoOffCheckBox”:checkBox.checked = !checkBox.checked;_settings.walle.autoOff = checkBox.checked;break;case “autoBattleCheckBox”:checkBox.checked = !ch
VisibleMan
actionscript-3 flash actionscript-2
I have a Flash AS3 application that uses FileReference.browse() to request a SWF from the user. If the chosen SWF is AS3, I’m good to go. However, if it’s AS2, I need to load it into an AS2 wrapper first (so my app can alter it). All of these files (including my app and wrapper) are intended to exist locally on the user’s machine, but the file they select can exist in any directory. So to be clear: Main application (AS3) -> Wrapper (AS2) -> User’s file (AS2)I know how to get the uploaded file’s
Eric Roos
actionscript-2 rsl
The parent movie is breaking if that one already gets the base parameter.a more clean method would be to load the child with the base parameter so the parent stays clean. I can’t strip the url of the SWF because i am working with Runtime Shared Librairys.Is it possible to use the base parameter in a loadMovie so it affects the children of that clip without interfering with the parent of the file?
josh
eternalthinker
flash actionscript-2
I have some code in ActionScript 2 similar to the below snippet (Item being a MovieClip):_root.createEmptyMovieClip(“Temp”,_root.getNextHighestDepth()); _root.Item.swapDepths(_root.Temp); _root.Temp.removeMovieClip(); // This doesn’t work ! I think the question is clear. I’m unable to remove Temp after swapping the depth (works fine otherwise).I also tried the following (but to no avail):depth = Item.getDepth(); _root.createEmptyMovieClip(“Temp”,_root.getNextHighestDepth()); _root.Item.swapDep
Asgaard
actionscript-2
Even if I loaded for dozen times an external swf into a movieclip… I dont know how to resize (layout) the targeted movieclip. I dont mean the quality… Let`s say the external SWF has 400 X 300 px and I want it to be loaded into a movieclip container about 200X100. How to resize the external SWF file prior to be loaded? Please HELP ! I know that in AS 3 there is some code with x/y variables… But my external SWF and the main page (in whic I want the swf to be loaded) are in AS 2. Anyone pls H
Stein G. Strindhaug
flash actionscript-3 actionscript-2 instance
Is it possible to get a list of all instances with a name in a flash movie using actionscript 2. Like an array containing all named text areas, or all movieClip instances etc. I would like to get this so the designer can add or remove text areas etc. and the actionscript can dynamically find these and get the texts from a separate datasource. I guess what I want is something like a DOM tree or even better something like how getElementByName() works in JavaScript. And allso get the string value o
VirtuosiMedia
php internationalization locale
I’ve read Joel’s article on Unicode and I feel that I have at least a basic grasp of internationalization from a character set perspective. In addition to reading this question, I’ve also done some of my own research on internationalization in regards to design considerations, but I can’t help but suspect that there is a lot more out there that I just don’t know or don’t know to ask.Some of the things I’ve learned:Some languages read right-to-left instead of left-to-right. Calendar, dates, times
alikins
python locale
Trying to display a localized date string in a text gui widget. The approach I am taking at the moment is to display the localized string with datetime.datetime.strftime(“%x”) into a text widget, so that a user can edit it. Then I try to parse the string with time.strptime(“x”). The current problem is that for some locales (or_IN, ja_JP.UTF-8, ko_KO.UTF-8) time.strptime(“x”) can’t parse the format generated by datetime.datetime.strftime(“%x”). It always throws a ValueError trying to parse this.
blackfedora
python django-templates apache2 django-views locale
I’ve got a simple Ubuntu/django/apache server set up and I’m having trouble formatting some of the numbers that I want to display in my Django templates. When I run the code locally (i.e. on my work machine) using the Django test server everything formats with no problem.Likewise, when I open up IDLE on the server I can do this:`>>> import locale>>> locale.setlocale(locale.LC_ALL,”)’en_US.UTF-8′>>> ‘{0:n}’.format(42424242)’42,424,242’`However whenever I try to run the apache server and test the
Cemal Eker
php date locale
I need to display to user a list of localized day names (like ‘Monday’, ‘Tuesday’, …) in a form. I know ho to get day name of any date. But is there a particular and fail-proof way to get all day names in an array. Edit: I could add names of days to my translation file but that is hard to maintain.
paercebal
language-agnostic locale
This question is directed to the non-english speaking people here.It is somewhat biased because SO is an “english-speaking” web forum, so… In the other hand, most developers would know english anyway…In your locale culture, are technical words translated into locale words ? For example, how “Design Pattern”, or “Factory”, or whatever are written/said in german, spanish, etc. etc. when used by IT? Are the english words prefered? The local translation? Do the two version (english/locale) are e
Mosty Mostacho
visual-c++ locale localeconv
As we all know, global data, like the locale settings affecting the numeric decimal point printf() and strtod() are using, is evil. Fortunately, MSVC++ 9 allows to use per-thread locales by a _configthreadlocale(_ENABLE_PER_THREAD_LOCALE) call. Unfortunately, it seems that the localeconv() function does not notice this and still returns the global locale settings, e.g. localeconv()->decimal_point seems to always return the global locale setting before the _configthreadlocale() call. Is this a bu
Jonathan Leffler
c unicode utf-8 character-encoding locale
What prerequisites are needed to do strict Unicode programming?Does this imply that my code should not use char types anywhere and that functions need to be used that can deal with wint_t and wchar_t?And what is the role played by multibyte character sequences in this scenario?
kranzky
python internationalization locale
We’re using a third-party middleware product that allows us to write code in an embedded Python interpreter, and which exposes an API that we can call into. Some of these API calls allow us to load various kinds of file, and the loading code is implemented in C. File loading happens in a separate thread, and calls back into Python when the data is available. So far, all well and dandy.We’ve been i14ing (heh) our product, and one thing we’d like to do is format user-facing numerical output accord
chris
visual-studio-2010 keyboard-shortcuts locale
It seems like every day or so, I hit some sort of key sequence that changes the keyboard mapping to something unexpected – for example, ctrl-s now produces ß instead of saving.How can I prevent this from happening?
Obay
php date locale languages
My code:setlocale(LC_TIME, ‘ca_ES’); echo strftime(“%#d %B”, strtotime($ticket->date_created));outputs something like:28 Augustinstead of my expectation:28 AgostI expect “Agost” because that is Catalan language (set through setlocale()).Is this how setlocale and strftime is supposed to work?FYI: My local development machine is Windows 7, set to locale: en-PH
Hedde
seo google indexing multilingual django
I am trying to create a multilingual website using the Django framework, all default content is English. I have added a native translation (Dutch).https://mydomain.com/ redirects to the user request language setting. (This is default behaviour by adding Django’s LocaleMiddleware)LocaleMiddleware tries to determine the user’s language preference byfollowing this algorithm:First, it looks for the language prefix in the requested URL. This isonly performed when you are using the i18n_patterns funct
Shadow Wizard
c# .net multilingual
I am a newbie for C#, although I have several years of experience with OOP.For a project in the design phase, I was chosen to find out how multilinguality can be done under C#. For the project, I am currently using Microsoft Visual Studio 2010 Express…What I have done till nowI read about several articles on this subject, like System.Resources FAQ, Multilingual Applications in .NET or C# multilingual support, but still have problems getting my demo to run.My demo worked without resource files
egilchri
perl utf-8 multilingual
I am processing strings encoded in utf-8, in Perl. One task is that I need a way to know that words starting with a letter with a diacritic, such as “écrit”, begin with the same letter as “elephant”, and also “England”. I need a general solution, since I will be working across several languages. I need to know this because I am creating letter headings, for an index. Each of the words I just mentioned would be stored under “E”.Is there a straightforward way to do this?
hakre
multilingual php
I’ve followed the tutorial in these YT videos to build a language switcher and bilingual site in PHP (no framework). When I try to test it in WAMP, however, I get the following error:Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ in C:\wamp\www\skydoll\lang\francais.php on line 6I have found by searching this site that this is often caused by the line above the reported error line, but being new to PHP I can’t seem to find anything wrong with the code.<?php$la
Oktay
ios multilingual
I display content in selected language which comes from the phone settings. Users may change the app language in settings of my app. I use NSUserDefaults to insert selected language to AppleLanguages key with setting objectAtIndex at 0. It works when application relaunches. But inside the app I cant see any change. I used NSUserDefaults syncronize but it is not working. Simply I want to reload my tabbed app views with chosen language at runtime.
Sandeep Bansal
c# wpf multilingual
What is the best way to make my C#/WPF application support different languages?I want to be able to give my users the choice to choose a language.Thanks
Betamoo
c# .net windows multilingual cultureinfo
I am developing a multilingual program in C# on WindowsHow to change Windows writing language on certain actions…e.g. to change from English to Arabic on focus event.Thanks
rick
c# file visual-studio-2008 globalization multilingual
This is a part of my multilingual website code . i am getting a runtime errorThread.CurrentThread.CurrentCulture = new CultureInfo(“en-US”);rm = new ResourceManager(“Resources.Default.apsx”, System.Reflection.Assembly.Load(System.IO.File.ReadAllBytes(“E:\\New folder\\multi_lang\\multi_lang\\App_LocalResources”)));ci = Thread.CurrentThread.CurrentCulture;Here i am gettingan error in second line saying 1.Make sure you have sufficient privilages to access this resourcesif you are attempting to acce
MikeyWard
iphone internationalization multilingual
For use in a questionnaire application, a web service will provide a list of questions in one of several languages, chosen by the user at runtime. The questions will be downloaded from the web service in the chosen language and displayed to the user.The problem: I have no idea how to do this.As a sample, I tried loading in UTF-8 text files (e.g. arabic.txt) in the resources containing samples of text in said languages. The files open and render properly in TextMate and TextEdit, but are illegi
akjoshi
c# .net wpf multilingual
I have a WPF application (in English) and I would like to let users to select different languages. I have read some possibilities to change languages in runtime applications, but I only want to choose a language during installation time and never change it.Do you think the fastest and easiest way to do it is developing different versions of the program (changing only text language) and let the user to select one of them during the installation?? Probably to repeat code only changing textbox or l
Web site is in building