It’s interesting idea and I think that such approach will work for you. What I would recommend you is that it will be better to use constructions like this:
// $singular = 1 - for 'me', 2 - for 'us'
$like_on = _n('Like me on %s', 'Like us on %s', $singular, 'my-plugin');
In this case it will be easier to understand how to translate the phrase.
Also read this question How-to: Translate plural forms for themes/plugins with PoEdit to understand how to configure your poedit
to support plural forms with WordPress keywords (like _n
, _n_noop
, _nx
and _nx_noop
).
Related Posts:
- How to get a translated string from a language other than the current one?
- How to get a localized version of WordPress from a repository?
- Working with l10n contexts (_x etc)
- How to escape the single quote character in i18n translation strings?
- How to escape single and plural i18n text strings?
- What are the most used WordPress localization?
- Difference between 2 internationalization (i18n) functions __() & _e()
- Localization works but still get “This plugin is not properly prepared for localization” msg in directory
- How to load theme textdomain from plugin?
- get_the_date() for translating date format
- POEdit with Custom mu-plugins code
- How does WordPress choose which translation file to use?
- Proper way to create / manage gettext (.po, .pot) files?
- Should I include colon in my msgid in PO file?
- _e() function get text_string from function
- Translations not returning translated strings
- Force translated language on front
- Translating dynamic strings
- WordPress translation loading english file
- Easy export/import of data for Translation
- WordPress Theme .mo-file won’t load
- How to become a translator on wordpress.org?
- Translation from .mo file not working in theme
- Localization, escape html elements mid-sentence
- WordPress localization – gettext and git
- Can I set WordPress to display languages based on system language without a plugin?
- /languages/ folder missing in default themes
- How to translate functions.php?
- WordPress Translations
- Post types translation
- Translate arguments of a user added custom code [closed]
- Internationalize plugin so strings can be translated in WPML [closed]
- localization of theme and plugins to English (originally in another language)
- Interface translation without plugins
- Plugin localization persistance (woocommerce)
- WordPress Localization error within return value
- Custom theme .mo translation file not working
- Plugin translation not displaying
- WordPress translation
- Tweak the loop for translation
- Translating form labels shortcode output
- Website Language/Locale Switching
- .po file is loaded but changes are not appearing
- How to create .pot files with POedit?
- How to make a WordPress plugin translation ready?
- Different Language for Frontend vs Backend
- How-to: Translate plural forms for themes/plugins with PoEdit
- generating po mo translating files from scratch in a wordpress theme
- custom theme: english .mo file not working
- Unknown language json files
- How to Translate Contact Form 7 using qTranslate? [closed]
- Best location for theme translation files
- Translation of plugin in MU-PLUGINS directory not working
- I can’t translate text in my plugin using a .mo file, load_plugin_textdomain() function is always false
- How to add translation for a string
- How to translate a WordPress.org plugin?
- How do I translate this string – PHP syntax question
- New plugin translation does not work
- Make changes to translation?
- Gutenberg not all editor text translated
- WPML Translated Term
- How to i18n text coming from the db or from an external source
- How to translate functions like get_the_date()?
- translating wordpress with poedit
- variables in translatable text
- How to add LTR to a custom theme which in RTL by default
- Generate PO File
- Updating WordPress Theme/Plugin POT file without losing line numbers consistency
- Use translated taxonomy labels in plugin
- Translation for frontend
- Translate pages and URLs without duplicating
- How can you locate the .po file used for translation of a page?
- Single translation for many locales
- Is there a way to test that readme looks in other language before submitting translation?
- Using _e() or __() to translate text with div
- How to solve a translation function issue with no arguments and missing a text-domain?
- Translation is not being output in one instance
- Why translations?
- Translation issue with global variables
- How to ignore extra whitespaces in translation functions like _e?
- Fix Problem With Textdomain Translation
- POEDIT – Continue with translations
- Plugin not properly prepared for localization
- WPML icl_register_string() throws fatal error but works [closed]
- WordPress translator plugin: Google Webmaster’s Tools shows hundreds of 404 not found errors. How to clean the mess?
- POT file generated using WP-CLI does not retrieve strings from translation functions with FQN (Qualifier)
- Using wp-cli to create a .pot file that interprets .twig files as well
- String translation within WordPress multisite with i18n not working on all sites
- Translate string inside twig template
- How to call wordpress API to translate a post request
- How to get dashboard langauge not the website language?
- Translate wordpress without duplicate custom post
- WordPress in French Language [closed]
- I dont know why my localization is not working
- How to ‘manually’ load translations/test domain outside theme context?
- How to Convert Date to Thai
- Locale changed but plugin still showing default language
- White Space on translated strings lost
- Theme translation file translating some strings and not translating others
- How to find posts that are missing translation? (wpml)