Wordpress .mo file not always detected - wordpress

i translated a wordpress site into simplified chinese, spanish, korean and deutsch with the help of WPML and .po/.mo files on wp-content/languages
All the languages editing went well, and i'm now finalizing the site. I need to translate three last strings. All is working on all languages, except simplified chinese (zh-hans):
I add the three new entries, i generate the .mo file with poedit, and nothing changes. The already translated string stays, and the news doesn't appears.
For testing, i removed the .mo file of simplified chinese, the site remains translated without changes. I'm stuck on it, are the translated strings in the database ? Is there .mo file caching from wordpress ?

Figured out the issue, WPML switched the locale from zh-hans to zh-cn without asking, regenerating .po and .mo.
Using a versioning system, i didn't saw the new files as they were generated by Wordpress.
Hope it helps

Related

Wordpress Contentberg theme latine extended - polish characters missing - issue

I have problem with wordpress page.
When in post, page is polish character - is not visible on web (like it was never be wrote). So instead of 'Śląsk' you will see: 'lsk'
Theme used on wordpress : Contenberg
Font setup on theme: Lato
Everywhere: turned on latine extend.
When you go to edit post you will see all this polsih characters - on live page there is not.
in database all data is correct and have proper characters.
font loaded when you run page:
https://fonts.googleapis.com/css?family=Lato%3A%7CLato%3A%7CLato%3A400%7CLato%3A600%7CLato%3A700%7CLato%3A%7CLato%3A%7CLato%3A%7CLato%3A400%7CLato%3A600%7CLato%3A700%7CLato%3A400%7CLato%3A600%7CLato%3A700%7CLato%3A%7CLato%3A%7CLato%3A%7CLato%3A%7CLato%3A400%7CLato%3A600%7CLato%3A700%7CLato%3A%7CLato%3A%7CLato%3A%7CLato%3A400%7CLato%3A600%7CLato%3A700%7CLato%3A400%7CLato%3A600%7CLato%3A700%7CLato%3A%7CLato%3A&subset=latin-ext
developer tool fonts loaded
Have no idea where can I find any other settings that can change displaying properly this characters.
I also check database encoding - UTF8, PHP - UTF8
I resolved this problem after few days fighting with.
The cause of the issue was plugin 'PB SEO friendly images'.
This plugin change encoding of whole wordpress, but do this in fly-mode so you will not see the changes in sources .
In settings there is information where you can change encoding:
PB SEO encoding settings
when you leave blank teoretically it should leave WP encoding deafult (which was utf8), but for some reason it changed. I just put there utf-8 and bang - polish characters back.
So issue resolved.

Wordpress site displays replacement character � in posts

Launched a new WP site about 1 month ago, and there were no issues at the time. Now there are instances of this character (�) inserting itself into posts. Looks to be happening where an open tag begins. Some sort of character encoding problem? Only happening in posts, not pages, so possibly a database issue?
You haven't copied and pasted the content from another editor like Word, have you?
It's encoding causing the problem, where Wordpress doesn't recognise the character you're using. If you hand code it rather than using the visual editor you shouldn't see it, and the most likely cause is inheriting the character from a piece of software that you have previously edited in.
Step 1) Open the wp-config.php file in a text editor such as notepad (the wp-config.php file can be found on the directory where you installed WordPress).
Step 2) Find the following two lines and comment them out:
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
They should look like the following after you comment them out:
//define('DB_CHARSET', 'utf8');
//define('DB_COLLATE', '');
Step 3) Now upload the updated wp-config.php file to your webhost (overwriting the old one).

HtmlEncode Local resources

I have a web site that uses local resources. The main text (so not the labels, etc.) on de default page is stored in a file. This file is added to my local resources file default.aspx.fi-FI.resx and is named text-defaultPage. It's a regular text file with tags etc.
The problem is however, that the text is Finnish in other words it uses a lot of characters having umlaut (ä) and other special characters.
The person for whom the web site is wants to edit this text himself but he doesn't know anything about programming, html entities etc.
Is there a way to make it so that those characters are encoded with say htmlEncode?
in my Global.asax I check for the selected language and the page gets reload with that language.
Edit
Never mind, I made the files Unicode text files.
Solution to the problem is make the files unicode.

Arabic Locale Support in Flex

Today, I learn how to localize my Flex application and to support multiple languages. The tutorials on-line are great. However, non of them mention the Arabic locale.
So basically, I created the Arabic (Jordan) locale files in the SDK folder by using:
copylocale en_US ar_JO
I navigated to the locale folder and I was able to see the ar_JO folder in there... So I assume everything went smooth.
Next, I followed the tutorials (www.babelfx.org) and was able to localize my test application in English, French, and Arabic. Clicking on any of those languages switches the labels of my simple form/into the desired language... however:
When switching to the Arabic language the labels turn into empty square symbols. If you are wondering, yes I can open a notepad and type Arabic text and save it successfully.
When I type Arabic text into the text boxes, I can see the Arabic words that I typed correctly (the labels are still square symbols).
Any ideas what I might be missing here??
I tried changing the font of my application (right on the application tag I set the fontFamily) into Simplified Arabic which comes by default on Windows.
Thanks
Have you embedded a font into your swf which can render Arabic? Are you using that font? If the answer is no to either, then I suggest reading up on the subject.
One thing to remember about Flash and fonts is that it has incredible power which comes from the fact that one is able to embed actual fonts into the swf itself. One also needs to remember that Flash is incredibly finicky and is prone to throwing fits if you fail to do so.
The solution is to change the context-type to UTF-8. Three ways to accomplish this from within Flex Builder:
(Option 1) Right click the file from the File Navigator and select Properties
(Option 2) With the file open, navigate to the File menu and choose Properties
(Option 3) With the file open, press Alt + Enter to bring up the file Properties
Once the properties window is displayed, you will see the option to change the file encoding from Default to Other (UTF-8).
Note: At least for me, once I changed the content-type to UTF-8, I had to close my unsaved file, open it back up, and paste my contents back into the file in order to clear the error message. Then clean the project (Project -> Clean...) and let it rebuild.
I found the solution. Actually, I didn't have to embed any fonts or anything in order to get it working.
My problem was the encoding in the resources.properties file. I opened it in Notepad++, then I noticed the Encoding menu. At that time, I remembered reading something about that the encoding of the resources files should be UTF-8. So I converted the encoding to UTF-8 from the menu, compiled, it didn't work! After couple of retries and cleaning the project, it worked successfully!!!
Just a reminder for everybody (as I have fallen into this while working this problem out):
For mx components, embedded fonts must have the embedAsCFF set to false.

.mo and .po files for wordpress theme internationalization

Ok, so I feel like a complete idiot asking this, but I've been looking around and I haven't found a decent answer.
I am using qTranslate as i18n plugin to create a multilingual website.
I have a localized framework/theme with a default.po file. I have built both en_CA.po/.mo and fr_FR.po/.mo files.
What do I do with these and how do I activate them?????
I have tried defining WPLANG in wp-config.php, with no result...
English is already the default one so it works fine, but the French one doesn't apply when switching form english to french... I still get the english text for theme strings (content translates fine)
Thanks for your help!
I figured out it appeared to be a setting in qTranslate that set both locales to en_US and fr_FR instead of en_CA and fr_CA
Thanks.

Resources