Hello,
glad you like the plugin.
Regarding your request, after having discussed with the teams, we have no plans to add this language format in the near future. We do not rule out doing so in the future, however.
in your case you can use the following filter:
// Use zh-HK (Hong Kong Chinese) instead tw (Traditional Chinese)
add_filter( 'weglot_language_code_replace', 'custom_weglot_language_code_replace' );
function custom_weglot_language_code_replace( $replacements ) {
$replacements['tw'] = 'zh-HK';
return $replacements;
}
you can update this code with your own language code
Hope it help you
Don’t hesitate if you have any question
Regards
Hi @glx77
Thanks for your response! I saw this code snippet that you have attached in reply.
It can certainly help, but I am not an end-user with a limited number of languages. I am trying to do an integration. In order for it to be identical in different situations and with different multilingual plugins, it would be great to have the language key association that WordPress offers with your keys within your own list.
I do not need a complete replacement of the key, but only get the current locale in WP native format.
Maybe is it possible to make a Pull Request as a third-party developer?
Please see what I mean to avoid the confusing https://gist.github.com/nikitasinelnikov/42cc8e2d7d6247544e11913925b50ede#file-languages-php-L6
Let me know your thoughts,
Best Regards!
Hi @nsinelnikov, thanks for you reply.
I understand what you but if we put the language code from wordpress you have to make some code to get the value.
so why not do this:
1- integrate the correspondence table on your side
2- use the weglot_get_current_language function to have the current language of weglot
3- retrieve the code corresponding to wordpress via your correspondence table
regards
Dear friends, is any of you available to do a small custom work for this JobBoardWP plugin?. All I need is to add some additional fields to the job submission form. I read the documentation to overrride the templates, but I could not successfully do the changes. Please let me know. Thanks. Contact email: marcopi1234@gmail.com