Some multi-lingual fixes
-
1. Add code to load translations for theme:
#FILE: mTheme-Unus/functions.phpfunction wpme_custom_theme_localization() { load_theme_textdomain('wp-mobile-edition', get_template_directory() .'/languages'); } add_action('after_setup_theme', 'wpme_custom_theme_localization');
2. Create folder: mTheme-Unus/languages/
3. Right now – there are only .mo files (
wp-mobile-edition/languages/wp-mobile-edition-xx_XX.mo
= forces to run .mo throughpomo/mo.php
decompilator to get .po).
= Provide either a base .pot / or better – .po for allwp-mobile-edition-xx_XX.mo
in theme:mTheme-Unus/languages/xx_XX.po
..4. Form fields have hardcoded placeholder text = change to use _e():
FILE: mTheme-Unus/page-contact-page.php
FILE: mTheme-Unus/page-fdx-contact.php
<input ... placeholder="<?php _e('Name'); ?>">
(same for email, subject).
<textarea ... placeholder="<?php _e('Message', 'wp-mobile-edition'); ?>">
(And add this phrase to .po, since “Message” not in WP core phrases)
- The topic ‘Some multi-lingual fixes’ is closed to new replies.