Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle mustache l10n #7

Open
fiddur opened this issue Mar 17, 2015 · 1 comment
Open

Handle mustache l10n #7

fiddur opened this issue Mar 17, 2015 · 1 comment

Comments

@fiddur
Copy link
Contributor

fiddur commented Mar 17, 2015

The way diversity.json is formed, po-files could exist in any structure.

Using PHP gettext requires a specific dir-structure. Use other lib or copy files in tmp somehow?

@fiddur
Copy link
Contributor Author

fiddur commented Mar 17, 2015

This is the earlier try that made me realise the problems of dir structure:

/// @todo Handle gettext
//if (isset($this->spec->i18n->$language->backend)) {
//  $po_dir = $this->getAssetUrl() .
//    substr($this->spec->i18n->$language->backend, 0, -strlen($language . '.po'));
//  $gettext_domain = 'apa';//$this->name . ':' . $this->version;
//  bindtextdomain($gettext_domain, $this->base_dir . 'locale');
//  //trigger_error("Set $gettext_domain to " . $this->base_dir . 'locale');
//
//  $template_data->gettext = function($text, $mustache) use ($gettext_domain) {
//    //trigger_error("domain: '$gettext_domain': " . dgettext($gettext_domain, trim($text)));
//    return $mustache->render(dgettext($gettext_domain, trim($text)));
//  };
//}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant