Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Source strings are assumed to be English, because en_US is the source language of WordPress. It is not currently possible to change this.

    https://localise.biz/wordpress/plugin/faqs/non-english-source

    Thread Starter Hrohh

    (@hrohh)

    Well I think, it should be optional. I have many clients, which wants to build low cost website in only Czech lang on WP on beginning of business. In future, client want to add English language to this template. In this time, we need to replace all Czech strings – so much work for nothing.

    I edited Loco JS file, which calls google translate api – changed to from “en” to “cs” a voala, I have translation in Loco.

    For these developers, you can add field in settings, which only replace (if will be filled) EN slug in URL to Google tramslate api. What do you think? Thank you.

    Plugin Author Tim W

    (@timwhitlock)

    Until WordPress has a configurable source language I’m disinclined to make it configurable in my plugin. Going against the way WordPress works will result in further problems and inevitably more support requests.

    As an example: it would be physically impossible to have this pluralized message as a source string in Czech, because the PO file format cannot support the three sources.

    Have said all this, I’m not against allowing the translation API’s take an alternative language code. I will look at implementing something in the next release – probably as a filter because I don’t want to encourage behaviour that is likely to produce errors.

    Plugin Author Tim W

    (@timwhitlock)

    I’ve added a new hook to v2.5.6 (currently in trunk).

    https://localise.biz/wordpress/plugin/hooks/loco_api_provider_source

    I’ve also extended an existing hook which overrides this setting for specific API providers:

    https://localise.biz/wordpress/plugin/hooks/loco_api_providers#src

    I’m marking this topic as resolved as I don’t plan on going further with the configuration of a non-english source language for the time being.

    Thread Starter Hrohh

    (@hrohh)

    Thank you so much, this filter will be useful in future.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘source of template’ is closed to new replies.