Spanish firefox showing wrong translation - firefox

Our Cake 1.3 php site is coded with English as the default language. On the front page we have a Spanish and Brazillian flag which is used to translate the site into the desired language via the use of .po files. When the flags are sued there is no problem with translations.
However we have found that when we use a Spanish version of Firefox to look directly at the site we see the brazilian text! I would have expected to see the English text or maybe even the browsers attempt to translate into Spanish.
Our Locale folder is structured as follows:
Locale
Por
LC_MESSAGES
default.po
Spa
LC_MESSAGES
default.po
Aprt from the obvious error of Spanish visitors to the site seeing Portugese this also leads to any sign ups that are done to be registered as an English sign up which is causing us a real head ache in the admin.
Is the Spanish firefox just picking the first translation file it sees? If so how do we stop this and either get it to use the correct version or, as I suspect it should be doing, show the english text thus making it obvious to press the Spanish flag.
Any help or advise would be appreciated.

Related

Alter Multilingual App Toolkit source language

So I understand how Multilingual App Toolkit 4.0 works and it works great for my Xamarin.Android project. The default language is English, and with MAT we've translated it to Dutch and German.
Then comes the translator along and asks about how to make changes to the English texts, which is my source texts and the basis of all translations. The source texts (English) are in a file Resources\values\Strings.xml. Alter a string there, would invalidate all translations (Dutch and German).
Besides invalidation, I can't send my translator the normal .xlf file, because all source texts are in the Strings.xml file.
So my question is, how can my translator alter the source language texts in the most easy way (preferably with an .xlf file)?
The short answer is that you can't. The design of the Multilingual App Toolkit focused on providing easy support for translation into other languages. The concept of providing source content editing was not considered.
That said, as a workaround you could add another variant of English. For Android apps, the default is English Neutral (en), so adding en-US or en-UK would create the XLIFF file that your translator / proofer could edit using the same tooling (e.g.: Multilingual Editor) to provide source content proofing. If using the same translator for proofing and translating, they could apply the translation based on the update English string to the Dutch and German files.
When you receive the XLF files back ensure all the resource in the proofing English XLF (e.g.: en-US) are marked as need review, translated or final (basically anything except 'New'). The reason is that the Multilingual App Toolkit does not include untranslated resource in the generated target resource file. (The reason is for language fallback purposes in Windows apps).
Now you can import the proofed English file with the other XLF file and build. Copy the entire contents from the proofed English resource file(s) overtop the original source files (recommend Comparing first). When you next build, you will receive warnings that the source resources have changed after the translation, but you can just review and clear those warning in the editor, or clear them globally within the Visual Studio IDE.

Testing Firefox Add-on/Extension Internationalization

I have created a Firefox Add-on using jpm and I have added a number of localization files such as:
locale/da.properties
locale/en-GB.properties
locale/en-US.properties
locale/fi.properties
And so on...
In my HTML files I use attributes to set these values, for example: data-l10n-id="ext_panel_heading_text".
I know the translations are working, because changes I make to values in en-GB.properties are reflected in my add-ons HTML page.
I've tried navigating to Options > Content > Choose... (under languages), removing English and adding another language (such as Finnish), however it doesn't seem to have an affect on the .properties file loaded by my extension. I also tried restarting Firefox after changing the language.
My question is: How do I test the different languages?
The language of Firefox is dependent on the activated language pack, or for Windows and Mac I believe it is hard coded into the build.
Language packs are available from https://addons.mozilla.org/en-US/firefox/language-tools/
The only way I know is to change general.useragent.locale to the locale you want to use (en-GB, da, en-US, fi) in about:configand then restarting your browser: that way your add-on should show localized texts.
As an alternative, you can use Quick Locale Switcher, which does the same but it's a little more friendly.

Laravel localization to German and special letters

I have a problem with some German's special letters (ö, ü...) in my Laravel application.
My encoding is set to UTF-8.
Everything works fine with the content from the database (where is utf8_general_ci). When I hardcode some text to Blade view files, that's fine, too. But, I'm using localization files (/app/lang/de/myFile.php) with an associative array.
German characters from that array are displayed as � � �. What is strange, when I var_dump(trans('myFile.key')) in Blade, special characters works, but when echo trans('myFile.key'), there are that question marks.
Any ideas?
Ok, after few hours :) I succeed! The point is to save localization file in UTF-8 encoding. Sublime Text by default saved it as Windows-1250.
I have had a similar problem with one of my projects; not sure if it is related though. Different web browsers handle locale and translations differently. Once in Firefox £ did not work properly unless you changed the browser's locale to UK. However, &163; worked universally. Opera seemed to work across the board but IE and Firefox had strange behavior when trying to use characters or symbols not native to the locale the browser was in.
First thing I would attempt is to change your browser's language and see if that fixes it. If so then the issue will be on how the browser is interpreting what gets returned. If this fixes it then there is a strong chance this will not be an issue for German speakers because their browser will (should) already support the language.
If not, then the problem could lay in the formatting of the files on the server. If the files are being stored on the webserver as ANSI then that could supersede the output. We had this problem as well due to an NFS mount and some windows users/editors. The most failsafe method I could suggest is changing ö and ü to &246; and &252; but I can understand where this would get tedious.

Emulator does not display localised simplified chinese text in windows phone

Although I have created a resource file for simplified chinese AppResources.zh-CH.resx, and i have added it in the supported culture in the csproj, the chinese text is not displayed. Instead the default english text is shown when i change the language to simplified chinese.
Though those text such as the month name which is obtained from the WP OS is shown in chinese.
The other languages such as spanish and german works like a charm. I have created the generic german and spanish( AppResources.de.resx, and AppResources.es.resx)
Am i missing? Do i have to make changes for any other changes for chinese?
Your entering the wrong (unsupported) culture for in the supported culture.
Please check the following link for the supported language and culture.

how to debug vb6 richtextbox not showing unicode (chinese) properly

I have a simple vb6 editor type application which has a richtextbox as the editor page. It allows users to key in stuff and the store it into a file which will keep all the text in RTF stored as CDATA in xml.
When you load back the file, it will read it off the xml and load back the rtf. We allow for unicode editing, but my problem is I have a user which is using Windows XP, and they have some problems reading the chinese characters. They show up as gibberish in their pc.
It displays fine in both mine and a coworker's. I've already checked that they have the proper regional language and settings in their system. The install files for east asian language is already checked. And they can see chinese words on websites and even type them out.
I feel like I'm missing something here but I'm at a lost on what to check next? Any ideas on what I could test or check next?
my bad for the poor description skills, if anything is not clear just ask me.
thanks.
~steve
That is weird. Try confirming that your user have the same version of RICHTXT32.OCX ?
Could be a problem with font?
Try using font that supports unicode characters (Arial Unicode).
Or try going to a website with chinese characters and paste it into richtextbox, save it to a file and try loading it from the file.
Does that work?
well they should because i packed the app in vs installer setup package.
and for fonts, it's sim sun, and i've already checked with the users that they do have the sim sun fonts under window/fonts.
Btw i've already updated that the data is actually stored in xml under CDATA, although the rtf chunk is kept as it is.
okie, this seems to be the solution although i don't know why. in my msi setup file i've included the riched.dll so when i installed it in, the dll acts up and screw up my chinese character in the richtext control.
but when i repack to exclude that dll file and reinstall using that setup, it seems to work now...

Resources